mediawiki-skins-Vector/.storybook/webpack.config.js
Bartosz Dziewoński 380d6d6789 Set strictUnits to true for LESS, and fix units in the code
Bug: T265650
Change-Id: I8f7522f84df31fdfc856901566c7d1fc78e12c66
2020-10-16 23:42:57 +00:00

55 lines
961 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: /\.(gif|png|jpe?g|svg)$/i,
loader: 'file-loader',
options: {
paths: [
path.resolve( __dirname, './resolve-imports' )
]
}
},
{
// in core some LESS imports don't specify filename
test: /\.less$/,
use: [ {
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'less-loader',
options: {
relativeUrls: false,
strictUnits: true,
paths: [
path.resolve( __dirname, 'resolve-imports' )
]
}
} ]
},
]
}
};