Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
mode,
plugins: [
// pending https://github.com/sveltejs/svelte/issues/2377
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode)
}),
].filter(Boolean),
devtool: dev && 'inline-source-map'
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { alias, extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
css: false,
generate: 'ssr',
dev
}
}
}
},
mode,
plugins: [
new MiniCssExtractPlugin({ filename: dev ? "[name].css" : "[name]-[contenthash].css" }),
// pending https://github.com/sveltejs/svelte/issues/2377
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
"process.browser": true,
"process.env.NODE_ENV": JSON.stringify(mode)
})
].filter(Boolean),
devtool: dev && "inline-source-map"
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: "node",
resolve: { extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat("encoding"),
module: {
rules: [
cssConfig,
{
test: /\.(svelte|html)$/,
use: {
loader: "svelte-loader",
options: {
css: false,
generate: "ssr",
dev
}
],
},
mode,
plugins: [
// Pending https://github.com/sveltejs/svelte/issues/2377.
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode),
}),
].filter(Boolean),
devtool: dev && 'inline-source-map',
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
preprocess,
css: false,
generate: 'ssr',
dev,
},
},
mode,
plugins: [
// Pending https://github.com/sveltejs/svelte/issues/2377.
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode),
}),
].filter(Boolean),
devtool: dev && 'inline-source-map',
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
preprocess,
css: false,
generate: 'ssr',
dev,
},
},
filename: '[name].css'
}),
// new CleanWebpackPlugin(['public'], {
// exclude: [],
// verbose: true
// }),
].filter(Boolean),
devtool: dev && 'inline-source-map',
stats: {
warnings: false
}
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { alias, extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
css: false,
generate: 'ssr',
dev,
preprocess
}
}
mode,
plugins: [
new MiniCssExtractPlugin({ filename: dev ? "[name].css" : "[name]-[contenthash].css" }),
// pending https://github.com/sveltejs/svelte/issues/2377
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
"process.browser": true,
"process.env.NODE_ENV": JSON.stringify(mode)
})
].filter(Boolean),
devtool: dev && "inline-source-map"
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: "node",
resolve: { extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat("encoding"),
module: {
rules: [
cssConfig,
{
test: /\.(svelte|html)$/,
use: {
loader: "svelte-loader",
options: {
css: false,
generate: "ssr",
dev
}
}
]
},
mode,
plugins: [
// pending https://github.com/sveltejs/svelte/issues/2377
// dev && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.browser': true,
'process.env.NODE_ENV': JSON.stringify(mode)
}),
].filter(Boolean),
devtool: dev && 'inline-source-map'
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { alias, extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
css: false,
generate: 'ssr',
dev
}
}
new MiniCssExtractPlugin({
filename: '[name].css'
}),
// new CleanWebpackPlugin(['public'], {
// exclude: [],
// verbose: true
// }),
].filter(Boolean),
devtool: dev && 'inline-source-map',
stats: {
warnings: false
}
},
server: {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: { alias, extensions, mainFields },
externals: Object.keys(pkg.dependencies).concat('encoding'),
module: {
rules: [
{
test: /\.(svelte|html)$/,
use: {
loader: 'svelte-loader',
options: {
css: false,
generate: 'ssr',
dev,
preprocess
}