mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
1803ac5b2d
Follow up to I58493db15b27f148fcc1cf42ab0b0148ee291eb6 Bug: T236589 Change-Id: I305badda5a3f93684270bfe07d6cc19c92df3e07
64 lines
1.1 KiB
JavaScript
64 lines
1.1 KiB
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: /\.jpg$/,
|
|
loader: 'url-loader'
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
loader: 'svg-inline-loader',
|
|
issuer: /\.js$/,
|
|
options: {
|
|
removeSVGTagAttrs: false // Keep width and height attributes.
|
|
}
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: [ '.js' ]
|
|
}
|
|
};
|