2017-01-26 21:31:41 +00:00
|
|
|
var path = require( 'path' );
|
|
|
|
var webpack = require( 'webpack' );
|
|
|
|
var PUBLIC_PATH = '/w/extensions/Popups';
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
output: {
|
|
|
|
// The absolute path to the output directory.
|
2017-02-13 13:47:59 +00:00
|
|
|
path: path.resolve( __dirname, 'resources/dist' ),
|
2017-01-26 21:31:41 +00:00
|
|
|
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.
|
2017-02-13 13:47:59 +00:00
|
|
|
filename: '/[name].js'
|
2017-01-26 21:31:41 +00:00
|
|
|
},
|
|
|
|
entry: {
|
2017-02-13 14:02:18 +00:00
|
|
|
index: './src/index.js'
|
2017-01-26 21:31:41 +00:00
|
|
|
},
|
2017-03-03 10:14:37 +00:00
|
|
|
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')
|
|
|
|
}
|
2017-03-03 10:24:45 +00:00
|
|
|
},
|
|
|
|
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()
|
|
|
|
]
|
2017-01-26 21:31:41 +00:00
|
|
|
};
|