4bd181d3cc
* fix: update to latest sapper fixes #416 * fix error and debug pages * requestIdleCallback makes column switching feel way nicer than double rAF * add export feature * add better csp info * workaround for sapper sub-page issue * clarify in readme about exporting * fix now config * switch from rIC to triple raf * style-loader is no longer used * update theming guide
37 lines
817 B
JavaScript
37 lines
817 B
JavaScript
const config = require('sapper/config/webpack.js')
|
|
const pkg = require('../package.json')
|
|
|
|
const dev = process.env.NODE_ENV === 'development'
|
|
|
|
module.exports = {
|
|
entry: config.server.entry(),
|
|
output: config.server.output(),
|
|
target: 'node',
|
|
resolve: {
|
|
extensions: ['.js', '.json', '.html'],
|
|
mainFields: ['svelte', 'module', 'browser', 'main']
|
|
},
|
|
externals: Object.keys(pkg.dependencies),
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.html$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'svelte-loader',
|
|
options: {
|
|
css: false,
|
|
store: true,
|
|
generate: 'ssr',
|
|
dev
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
mode: process.env.NODE_ENV,
|
|
performance: {
|
|
hints: false // it doesn't matter if server.js is large
|
|
}
|
|
}
|