@@ -344,6 +344,9 @@ function scaffoldSvelte() {
344
344
const customViteConfig = vitConfig . replace (
345
345
/ ^ } ( .* ?) $ / gm, // Search for the last ' }' in the file.
346
346
`,
347
+ build: {
348
+ target: 'esnext'
349
+ },
347
350
optimizeDeps: { esbuildOptions: { target: 'esnext' } }
348
351
});`
349
352
) ;
@@ -566,8 +569,8 @@ async function scaffoldNext(projectName) {
566
569
567
570
console . log (
568
571
'Using project name ' +
569
- projectName +
570
- ' for github repo name. Please change in next.config.js and pages/reactCOIServiceWorker.tsx if this is not correct or changes'
572
+ projectName +
573
+ ' for github repo name. Please change in next.config.js and pages/reactCOIServiceWorker.tsx if this is not correct or changes'
571
574
) ;
572
575
573
576
let newNextConfig = nextConfig . replace (
@@ -598,19 +601,17 @@ async function scaffoldNext(projectName) {
598
601
// Add some scripts to the package.json
599
602
let x = fs . readJSONSync ( `ui/package.json` ) ;
600
603
x . scripts [ 'export' ] = 'next export' ;
601
- const deployScript = `next build && next export && ${
602
- isWindows
604
+ const deployScript = `next build && next export && ${ isWindows
603
605
? `type nul > ${ path . join ( 'out' , '.nojekyll' ) } `
604
606
: `touch ${ path . join ( 'out' , '.nojekyll' ) } `
605
- } && git add -f out && git commit -m "Deploy gh-pages" && cd .. && git subtree push --prefix ui/out origin gh-pages`;
607
+ } && git add -f out && git commit -m "Deploy gh-pages" && cd .. && git subtree push --prefix ui/out origin gh-pages`;
606
608
x . scripts [ 'deploy' ] = deployScript ;
607
609
fs . writeJSONSync ( path . join ( 'ui' , 'package.json' ) , x , { spaces : 2 } ) ;
608
610
609
611
sh . cd ( 'ui' ) ;
610
612
await step (
611
613
'COI-ServiceWorker: NPM install' ,
612
- `npm install coi-serviceworker --save > ${
613
- isWindows ? 'NUL' : '"/dev/null" 2>&1'
614
+ `npm install coi-serviceworker --save > ${ isWindows ? 'NUL' : '"/dev/null" 2>&1'
614
615
} `
615
616
) ;
616
617
0 commit comments