Files
SCM-Manager/scm-ui/ui-components/.storybook/webpack.config.js

49 lines
1008 B
JavaScript
Raw Normal View History

const WorkerPlugin = require("worker-plugin");
module.exports = {
module: {
rules: [
{
parser: {
system: false,
systemjs: false
}
},
{
test: /\.(js|ts|jsx|tsx)$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
options: {
cacheDirectory: true,
presets: ["@scm-manager/babel-preset"]
}
}
]
},
{
test: /\.(css|scss|sass)$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader"
]
},
{
test: /\.(png|svg|jpg|gif|woff2?|eot|ttf)$/,
use: ["file-loader"]
}
]
},
resolve: {
2020-01-22 12:08:28 +01:00
extensions: [".ts", ".tsx", ".js", ".jsx", ".css", ".scss", ".json"]
},
plugins: [
new WorkerPlugin()
]
};