Page MenuHomePhabricator

Create wikitext wrapper plugin for Vite
Closed, ResolvedPublic3 Estimated Story Points

Description

We must wrap the compiled JavaScript of all Wikipedia.org entry points in wikitext so they contain tracking information that's usable by the tracking code in the Fundraising operation center and to be able to paste them into CentralNotice.

Acceptance Criteria:

  • The output of a vite compilation wraps the compiled JavaScript in Wikitext
  • The the output in the dist directory replaces the .js file with the wrapped .wikitext one

Implementation Details:

  • Look at the existing code in webpack/mediawiki_text_wrapper.js to see the internal logic
  • Vite uses rollup.js for bundling. The Plugin will be a a rollup plugin rather than a vite plugin. The most likely candidate to "hook into" is the generateBundle hook.
  • Try to replace the Handlebars Library and the Handlebars template with ES6 tagged templates

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

AbbanWMDE subscribed.
gabriel-wmde changed the point value for this task from 13 to 3.Feb 6 2023, 11:07 AM
kai.nissen removed gabriel-wmde as the assignee of this task.