From b82f6ff32edf68db704cf5241163ba337d11d504 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 22 Jun 2024 17:08:37 -0700 Subject: [PATCH] Try disableing postcss when running vite --- packages/webamp/foo.html | 4842 --------------------- packages/webamp/scripts/rollupPlugins.mjs | 12 +- 2 files changed, 7 insertions(+), 4847 deletions(-) delete mode 100644 packages/webamp/foo.html diff --git a/packages/webamp/foo.html b/packages/webamp/foo.html deleted file mode 100644 index cbfee4f8..00000000 --- a/packages/webamp/foo.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - diff --git a/packages/webamp/scripts/rollupPlugins.mjs b/packages/webamp/scripts/rollupPlugins.mjs index 102b56fc..d7d97c34 100644 --- a/packages/webamp/scripts/rollupPlugins.mjs +++ b/packages/webamp/scripts/rollupPlugins.mjs @@ -41,10 +41,12 @@ export function getPlugins({ minify, outputFile, vite }) { // causes it to try to parse the js version as JSON. vite ? null : json(), // https://www.npmjs.com/package/rollup-plugin-import-css - postcss({ - inject: false, - plugins: [atImport, postcssOptimizeDataUriPngs], - }), + vite + ? null + : postcss({ + inject: false, + plugins: [atImport, postcssOptimizeDataUriPngs], + }), // Without this we get: Error: 'default' is not exported by node_modules/react/index.js // because react-redux import react as if it were an es6 module, but it is not. commonjs(), @@ -52,7 +54,7 @@ export function getPlugins({ minify, outputFile, vite }) { babel({ babelHelpers: "bundled" }), minify ? terser() : null, // Generate a report so we can see how our bundle size is spent - visualizer({ filename: `./${outputFile}.html` }), + vite ? null : visualizer({ filename: `./${outputFile}.html` }), ].filter(Boolean); return plugins;