Async Function is crashed.
Closed this issue · 0 comments
brandonxiang commented
sveltejs/svelte-loader#62
sveltejs/svelte#717
exclude
is essential for babel-loader, because svelte compiler should not be transformed by babel, while runtime needs to be transformed.
{
rules: [
{
// https://github.com/sveltejs/svelte/issues/717
test: /\.m?js$/,
exclude: /node_modules\/(?!svelte)/,
use: 'babel-loader',
},
{
test: /\.svelte$/,
exclude: /node_modules\/(?!svelte)/,
use: [
{ loader: 'babel-loader' },
{
loader: 'svelte-loader',
options: {
emitCss: true,
hotReload: true,
preprocess: require('svelte-preprocess')({
postcss: true,
}),
},
},
],
},
}