use worker plugin for storybook webworker integration

This commit is contained in:
Sebastian Sdorra
2020-01-27 14:05:36 +01:00
parent 3a8ae34e89
commit 2dec396dff
3 changed files with 19 additions and 31 deletions

View File

@@ -1,3 +1,5 @@
const WorkerPlugin = require("worker-plugin");
module.exports = {
module: {
rules: [
@@ -20,10 +22,6 @@ module.exports = {
}
]
},
{
test: /\.worker\.(j|t)s$/,
use: { loader: "worker-loader" }
},
{
test: /\.(css|scss|sass)$/i,
use: [
@@ -43,5 +41,8 @@ module.exports = {
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx", ".css", ".scss", ".json"]
}
},
plugins: [
new WorkerPlugin()
]
};