mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-13 17:56:55 +00:00
eff14acbba
Webpack 1.14.0 is an old version, switch to using latest stable which has better documentation, tree shaking, ES2015 modules and a core team of contributors with funding. See https://webpack.js.org/ Additional changes: * Recompile the frontend assets Change-Id: I2c5940276e99dee104d04c6a0b83d8ab36a99df5
32 lines
989 B
JavaScript
32 lines
989 B
JavaScript
var path = require( 'path' );
|
|
var webpack = require( 'webpack' );
|
|
var PUBLIC_PATH = '/w/extensions/Popups';
|
|
|
|
module.exports = {
|
|
output: {
|
|
// The absolute path to the output directory.
|
|
path: path.resolve( __dirname, 'resources/dist' ),
|
|
devtoolModuleFilenameTemplate: PUBLIC_PATH + '/[resource-path]',
|
|
|
|
// Write each chunk (entries, here) to a file named after the entry, e.g.
|
|
// the "index" entry gets written to index.js.
|
|
filename: '/[name].js'
|
|
},
|
|
entry: {
|
|
index: './src/index.js'
|
|
},
|
|
devtool: 'source-map',
|
|
resolve: {
|
|
alias: {
|
|
redux: path.resolve(__dirname, 'node_modules/redux/dist/redux.js'),
|
|
'redux-thunk': path.resolve(__dirname, 'node_modules/redux-thunk/dist/redux-thunk.js')
|
|
}
|
|
},
|
|
plugins: [
|
|
// To generate identifiers that are preserved over builds, webpack supplies
|
|
// the NamedModulesPlugin (generates comments with file names on bundle)
|
|
// https://webpack.js.org/guides/caching/#deterministic-hashes
|
|
new webpack.NamedModulesPlugin()
|
|
]
|
|
};
|