Official webpack-template broken with svero by default
shortjared opened this issue · 2 comments
shortjared commented
By default, the webpack-template
svelte projet excludes node_modules
from the Svelte loader. This means svero
breaks as it cannot be loaded. Removing the exclude
rule makes everything work great.
module: {
rules: [
{
test: /\.svelte$/,
exclude: /node_modules/,
use: {
loader: 'svelte-loader',
options: {
emitCss: true,
hotReload: true
}
}
},
eugenjj commented
@shortjared you can use this regex
exclude: /node_modules\/(?!(svero)\/).*/,
more can find here webpack/webpack#2031 (comment)
shortjared commented
Yep, I would suggest this is somehow documented in the repository for those using webpack. Took me a bit to figure it out being new to svelte in general