mediawiki-extensions-Popups/webpack.config.js
jdlrobson 20e7564bed Webpack: Complete transition to webpack for ext.popups module
boot.js is renamed to index.js and popups is now bundled
up inside popups.js

To support qunit tests, the library is still exposed as
mw.popups with a FIXME to remove later when it is no longer
necessary

Bug: T156333
Change-Id: Ieb6b4b0344af2701f99ef0fcc786d2378fd2fceb
2017-02-13 13:48:52 +01:00

20 lines
550 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/' ),
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]/index.js'
},
entry: {
'ext.popups': './build/ext.popups/index.js'
},
devtool: 'source-map'
};