mediawiki-extensions-Popups/webpack.config.js
Sam Smith 29df4b11be build: Make webpack config compatible with v2.3.0
webpack@2.3.0 expects the output.filename config variable to be a
relative path.

Change-Id: If82a0d6d69e0400c1d5b5722ea7dd6bd55160204
2017-03-22 11:32:35 +00:00

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()
]
};