We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19e8c68 commit e444375Copy full SHA for e444375
packages/vite/src/node/plugins/css.ts
@@ -636,10 +636,10 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
636
`${style}.textContent = ${cssString};` +
637
`document.head.appendChild(${style});`
638
const wrapIdx = code.indexOf('System.register')
639
- const insertMark = "'use strict';"
640
- const insertIdx = code.indexOf(insertMark, wrapIdx)
+ const executeFnStart =
+ code.indexOf('{', code.indexOf('execute:', wrapIdx)) + 1
641
const s = new MagicString(code)
642
- s.appendLeft(insertIdx + insertMark.length, injectCode)
+ s.appendRight(executeFnStart, injectCode)
643
if (config.build.sourcemap) {
644
// resolve public URL from CSS paths, we need to use absolute paths
645
return {
0 commit comments