mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-16 20:18:00 +00:00
29df4b11be
webpack@2.3.0 expects the output.filename config variable to be a relative path. Change-Id: If82a0d6d69e0400c1d5b5722ea7dd6bd55160204
32 lines
988 B
JavaScript
32 lines
988 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()
|
|
]
|
|
};
|