richardtallent / vite-plugin-singlefile

Vite plugin for inlining JavaScript and CSS resources
MIT License
859 stars 58 forks source link

updating chalk from 4.1.0 to 5.0.0 causes issues #22

Closed turtiustrek closed 2 years ago

turtiustrek commented 2 years ago

failed to load config from www/vite.config.js error during build: Error [ERR_REQUIRE_ESM]: require() of ES Module www/node_modules/vite-plugin-singlefile/node_modules/chalk/source/index.js from www/node_modules/vite-plugin-singlefile/dist/index.js not supported. Instead change the require of www/node_modules/vite-plugin-singlefile/node_modules/chalk/source/index.js in www/node_modules/vite-plugin-singlefile/dist/index.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (www/node_modules/vite-plugin-singlefile/dist/index.js:7:33) at async Promise.all (index 0) at async loadConfigFromFile (www/node_modules/vite/dist/node/chunks/dep-9c153816.js:71335:31) at async resolveConfig (www/node_modules/vite/dist/node/chunks/dep-9c153816.js:70873:28) at async doBuild (www/node_modules/vite/dist/node/chunks/dep-9c153816.js:38971:20) at async build (www/node_modules/vite/dist/node/chunks/dep-9c153816.js:38959:16) at async CAC.<anonymous> (www/node_modules/vite/dist/node/cli.js:738:9)