prosemirror-noting icon indicating copy to clipboard operation
prosemirror-noting copied to clipboard

Move build from rollup to vite

Open rhystmills opened this issue 9 months ago • 0 comments

What does this change?

This PR moves the build process from Rollup to Vite, removes many now-unused dependencies, and bumps the version of many remaining dependencies.

Running yarn build was failing for me - possible due to some clashes in dependency changes since the last release (four years ago). I had a go at bumping various packages but kept encountering errors related to either rollup or eslint. With so many linked dependencies, it was difficult to isolate which one was at the route of the problem.

I've decided instead to remove rollup completely, and replace with Vite. Vite is used more widely in Content Production, especially in related packages like https://github.com/guardian/prosemirror-typerighter and https://github.com/guardian/prosemirror-editor

eslint has been modernised, using the new config format, replacing .eslintrc.json.

How to test

  1. Run yarn then yarn build locally in this project. Does it build?
  2. There should be (at least) files called noting.js and noting.css in the top level dist folder.

You could also try publishing locally with yarn yalc and then use it in flexible-content (via yalc add @guardian/prosemirror-noting in the composer directory).

rhystmills avatar May 17 '24 12:05 rhystmills