Skip to content

Commit c4a0e68

Browse files
committed
Disable post-css injection for vite
1 parent 7be1d59 commit c4a0e68

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packages/webamp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint-fix": "eslint . --ext ts,tsx,js --fix",
3232
"lint": "eslint . --ext ts,tsx,js",
3333
"type-check": "tsc",
34-
"build": "vite build",
34+
"build": "vite build --emptyOutDir",
3535
"build-library": "node ./scripts/rollup.mjs",
3636
"prepublishOnly": "npm run build-library && npm run type-check",
3737
"publish-next": "yarn publish --new-version=\"0.0.0-next-$(git rev-parse --short HEAD)\" --tag next",

packages/webamp/scripts/rollupPlugins.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ export function getPlugins({ minify, outputFile, vite }) {
4040
// causes it to try to parse the js version as JSON.
4141
vite ? null : json(),
4242
// https://www.npmjs.com/package/rollup-plugin-import-css
43-
postcss({
44-
inject: false,
45-
plugins: [atImport, postcssOptimizeDataUriPngs],
46-
}),
43+
vite
44+
? null
45+
: postcss({
46+
inject: false,
47+
plugins: [atImport, postcssOptimizeDataUriPngs],
48+
}),
4749
// Without this we get: Error: 'default' is not exported by node_modules/react/index.js
4850
// because react-redux import react as if it were an es6 module, but it is not.
4951
commonjs(),

0 commit comments

Comments
 (0)