Skip to content

Commit

Permalink
[#150] fix: override of 'build.cssCodeSplit' will not take effect if …
Browse files Browse the repository at this point in the history
…`config.build.cssCodeSplit` is `undefined` (#148)

3.5.2
  • Loading branch information
marco-prontera committed Sep 27, 2024
1 parent 6c30640 commit 8ef2415
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-css-injected-by-js",
"version": "3.5.1",
"version": "3.5.2",
"description": "A Vite plugin that takes the CSS and adds it to the page through the JS. For those who want a single JS file.",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function cssInjectedByJsPlugin({
}

if (relativeCSSInjection == true) {
if (config.build.cssCodeSplit == false) {
if (!config.build.cssCodeSplit) {
config.build.cssCodeSplit = true;
warnLog(
`[vite-plugin-css-injected-by-js] Override of 'build.cssCodeSplit' option to true, it must be true when 'relativeCSSInjection' is enabled.`
Expand Down

0 comments on commit 8ef2415

Please sign in to comment.