richardtallent / vite-plugin-singlefile

Vite plugin for inlining JavaScript and CSS resources
MIT License
810 stars 53 forks source link

Upgrade to `chalk@5.0.1` and optimize dependencies for dev vs prod usage #25

Closed Greenheart closed 2 years ago

Greenheart commented 2 years ago

NOTE: These changes are potentially breaking, and should thus be released as 0.8.0 to follow semver.

I've tested with two local projects and everything works as expected when using latest Node 16 LTS and latest vite (2.9..5 as of writing).

Changes in this PR:

Let me know if I've missed something, and I'll update the PR 🙂

richardtallent commented 2 years ago

I'd move the whole world to ESM if I could. All good with these changes. Time for a version jump anyway.

richardtallent commented 2 years ago

Turns out the "dom" bit is required in tsconfig.js, otherwise we get the following error when building with tsc:

node_modules/esbuild/lib/main.d.ts:582:16 - error TS2503: Cannot find namespace 'WebAssembly'.
582   wasmModule?: WebAssembly.Module
                   ~~~~~~~~~~~
Found 1 error in node_modules/esbuild/lib/main.d.ts:582

Otherwise, this and the other recent changes have been released now as 0.8.0, thanks!