Closed Greenheart closed 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.
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!
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:
vite-plugin-singlefile
as ESM, and add"type": "module"
to package.json.vite-plugin-singlefile
.vite-plugin-singlefile
have installed for all users despite not being used in this project:esbuild
,esbuild-plugin-rollup
,@rollup/plugin-node-resolve
.rollup
to devDependencies since we're only using it for type checking during development, and thus don't need users to install rollup to use the built plugin.Let me know if I've missed something, and I'll update the PR 🙂