Skip to content

Commit

Permalink
Disable post-css injection for vite
Browse files Browse the repository at this point in the history
  • Loading branch information
captbaritone committed Oct 1, 2024
1 parent 5c91bfa commit cb797c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/webamp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint-fix": "eslint . --ext ts,tsx,js --fix",
"lint": "eslint . --ext ts,tsx,js",
"type-check": "tsc",
"build": "vite build",
"build": "vite build --emptyOutDir",
"build-library": "node ./scripts/rollup.mjs",
"prepublishOnly": "npm run build-library && npm run type-check",
"publish-next": "yarn publish --new-version=\"0.0.0-next-$(git rev-parse --short HEAD)\" --tag next",
Expand Down
10 changes: 6 additions & 4 deletions packages/webamp/scripts/rollupPlugins.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,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(),
Expand Down

0 comments on commit cb797c7

Please sign in to comment.