mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-12 01:08:39 +00:00
da369d09ae
- Adds CSSJanus support on a story-by-story basis for the Storybook app. - Adds an extra RTL portrait thumbnail test-case. - Adds an extra RTL 'thin' portrait thumbnail test-case. - Removes the `createContextualFragment` wrapper from stories, as well as the wrapper divs. Bug: T204627 Change-Id: I22195c6ddc73d69f15dc8e24c33b49ef28d9b0be
78 lines
1.5 KiB
JavaScript
78 lines
1.5 KiB
JavaScript
const path = require("path");
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
module: {
|
|
rules: [ {
|
|
test: /\.less$/,
|
|
use: [{
|
|
loader: 'style-loader'
|
|
}, {
|
|
loader: 'css-loader'
|
|
}, {
|
|
loader: 'less-loader',
|
|
options: {
|
|
paths: [
|
|
/**
|
|
* Less files are resolved to this path,
|
|
* which contain less files that essentially
|
|
* just reach into mediawiki core fo the
|
|
* appropriate files.
|
|
* This path is also specified in stories/index.stories.less
|
|
* when importing '../../src/ui/index.less'.
|
|
*/
|
|
path.resolve(__dirname, './mocks/less')
|
|
]
|
|
}
|
|
}],
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
issuer: /\.less$/,
|
|
loader: 'url-loader'
|
|
},
|
|
{
|
|
test: /\.svg$/,
|
|
loader: 'svg-inline-loader',
|
|
issuer: /\.js$/,
|
|
options: {
|
|
removeSVGTagAttrs: false // Keep width and height attributes.
|
|
}
|
|
},
|
|
{
|
|
test: require.resolve('jquery'),
|
|
use: [{
|
|
loader: 'expose-loader',
|
|
options: 'jQuery'
|
|
}, {
|
|
loader: 'expose-loader',
|
|
options: '$'
|
|
}]
|
|
},
|
|
{
|
|
test: require.resolve('./mocks/js/mockMediaWiki.js'),
|
|
use: [{
|
|
loader: 'expose-loader',
|
|
options: 'mw'
|
|
}, {
|
|
loader: 'expose-loader',
|
|
options: 'mediaWiki'
|
|
}]
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'mediaWiki': require.resolve('./mocks/js/mockMediaWiki.js'),
|
|
'mw': require.resolve('./mocks/js/mockMediaWiki.js')
|
|
},
|
|
extensions: [ '.js' ]
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
mw: 'mw',
|
|
mediaWiki: 'mediaWiki'
|
|
} )
|
|
]
|
|
};
|