A webpack loader for svelte-draft.
npm install --save-dev svelte-draft-loader
OR
yarn add --dev svelte-draft-loader
webpack.config.js
module.exports = {
// ...
module: {
rules: [
{
test: /\.tsx$/,
use: [
{
loader: 'svelte-loader',
options: {
emitCss: true,
hotReload: true
}
},
'svelte-draft-loader'
]
},
{
test: /\.css$/,
use: [
prod ? MiniCssExtractPlugin.loader : 'style-loader',
'css-loader'
]
}
]
}
// ...
}