|
|
|
@ -13,6 +13,9 @@ const mode = process.env.NODE_ENV;
|
|
|
|
|
const dev = mode === 'development';
|
|
|
|
|
const legacy = !!process.env.SAPPER_LEGACY_BUILD;
|
|
|
|
|
|
|
|
|
|
const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning);
|
|
|
|
|
const dedupe = importee => importee === 'svelte' || importee.startsWith('svelte/');
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
client: {
|
|
|
|
|
input: config.client.input(),
|
|
|
|
@ -28,7 +31,10 @@ export default {
|
|
|
|
|
hydratable: true,
|
|
|
|
|
emitCss: true
|
|
|
|
|
}),
|
|
|
|
|
resolve(),
|
|
|
|
|
resolve({
|
|
|
|
|
browser: true,
|
|
|
|
|
dedupe
|
|
|
|
|
}),
|
|
|
|
|
commonjs(),
|
|
|
|
|
json(),
|
|
|
|
|
|
|
|
|
@ -53,6 +59,7 @@ export default {
|
|
|
|
|
module: true
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
onwarn
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
server: {
|
|
|
|
@ -67,7 +74,9 @@ export default {
|
|
|
|
|
generate: 'ssr',
|
|
|
|
|
dev
|
|
|
|
|
}),
|
|
|
|
|
resolve(),
|
|
|
|
|
resolve({
|
|
|
|
|
dedupe
|
|
|
|
|
}),
|
|
|
|
|
commonjs(),
|
|
|
|
|
json()
|
|
|
|
|
],
|
|
|
|
@ -78,6 +87,7 @@ export default {
|
|
|
|
|
require('module').builtinModules || Object.keys(process.binding('natives'))
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
onwarn
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
serviceworker: {
|
|
|
|
|