diff --git a/demo/noop.js b/demo/noop.js new file mode 100644 index 00000000..834ecd2d --- /dev/null +++ b/demo/noop.js @@ -0,0 +1,2 @@ +// See https://github.com/vitejs/vite/issues/9200 +module.exports = {}; diff --git a/demo/vite.config.ts b/demo/vite.config.ts index 33d7e5b2..e5ac0646 100644 --- a/demo/vite.config.ts +++ b/demo/vite.config.ts @@ -3,6 +3,16 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ + resolve: { + alias: { + // Silence Vite warnings about node packages loaded by postcss + // See https://github.com/vitejs/vite/issues/9200 + path: './noop.js', + fs: './noop.js', + url: './noop.js', + 'source-map-js': './noop.js', + }, + }, plugins: [react()], server: { port: 8080,