mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
fix: cloudflare and polyfill
This commit is contained in:
parent
15fff5117f
commit
cb98031cff
@ -13,7 +13,11 @@ export const cloudflare: SigmaPreset = extendPreset(worker, {
|
||||
async 'sigma:compiled' ({ output, _nuxt }: SigmaContext) {
|
||||
await writeFile(resolve(output.dir, 'package.json'), JSON.stringify({ private: true, main: './server/index.js' }, null, 2))
|
||||
await writeFile(resolve(output.dir, 'package-lock.json'), JSON.stringify({ lockfileVersion: 1 }, null, 2))
|
||||
consola.success('Ready to run `wrangler publish` in', prettyPath(_nuxt.rootDir))
|
||||
let inDir = prettyPath(_nuxt.rootDir)
|
||||
if (inDir) {
|
||||
inDir = 'in ' + inDir
|
||||
}
|
||||
consola.success('Ready to run `wrangler publish`', inDir)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -132,7 +132,7 @@ export const getRollupConfig = (sigmaContext: SigmaContext) => {
|
||||
|
||||
// Polyfill
|
||||
rollupConfig.plugins.push(virtual({
|
||||
'~polyfill': env.polyfill.map(p => `require('${p}');`).join('\n')
|
||||
'~polyfill': env.polyfill.map(p => `import '${p}';`).join('\n')
|
||||
}))
|
||||
|
||||
// https://github.com/rollup/plugins/tree/master/packages/alias
|
||||
|
Loading…
Reference in New Issue
Block a user