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 {
636636 `${ style } .textContent = ${ cssString } ;` +
637637 `document.head.appendChild(${ style } );`
638638 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
641641 const s = new MagicString ( code )
642- s . appendLeft ( insertIdx + insertMark . length , injectCode )
642+ s . appendRight ( executeFnStart , injectCode )
643643 if ( config . build . sourcemap ) {
644644 // resolve public URL from CSS paths, we need to use absolute paths
645645 return {
You can’t perform that action at this time.
0 commit comments