File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -636,10 +636,10 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
636
636
`${ style } .textContent = ${ cssString } ;` +
637
637
`document.head.appendChild(${ style } );`
638
638
const wrapIdx = code . indexOf ( 'System.register' )
639
- const insertMark = "'use strict';"
640
- const insertIdx = code . indexOf ( insertMark , wrapIdx )
639
+ const executeFnStart =
640
+ code . indexOf ( '{' , code . indexOf ( 'execute:' , wrapIdx ) ) + 1
641
641
const s = new MagicString ( code )
642
- s . appendLeft ( insertIdx + insertMark . length , injectCode )
642
+ s . appendRight ( executeFnStart , injectCode )
643
643
if ( config . build . sourcemap ) {
644
644
// resolve public URL from CSS paths, we need to use absolute paths
645
645
return {
You can’t perform that action at this time.
0 commit comments