mediawiki-extensions-Popups/.storybook/webpack.config.js
jdlrobson 189b386a13 Publish storybook now we are using more modern node
Breaking change - I was having issues getting the knobs feature
to work so it has been removed for the time being.

Bug: T236589
Depends-On: I8505d2dad69aefed5f8ed1f599b3ca1b7e79acf5
Change-Id: I42fbf37124477e2d950b4bca15acf77703cd3f5d
2019-12-11 15:16:13 -08:00

60 lines
1,022 B
JavaScript

const path = require("path");
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
// Beware of https://github.com/babel/babel-loader/issues/690. Changes to browsers require
// manual invalidation.
cacheDirectory: true
}
}
},
{
test: /\.css$/,
use: [ {
loader: 'style-loader'
}, {
loader: 'css-loader'
} ]
},
{
test: /\.less$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'less-loader',
options: {
paths: [
path.resolve( __dirname, 'mocks' )
]
}
}],
},
{
test: /\.svg$/,
issuer: /\.less$/,
loader: 'url-loader'
},
{
test: /\.svg$/,
loader: 'svg-inline-loader',
issuer: /\.js$/,
options: {
removeSVGTagAttrs: false // Keep width and height attributes.
}
}
]
},
resolve: {
extensions: [ '.js' ]
}
};