diff --git a/webpack.common.js b/webpack.common.js index 6abc732d3..e52db3856 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -5,6 +5,11 @@ const path = require('path'); const webpack = require('webpack'); const config = { + output: { + path: path.resolve(__dirname, 'dist'), // Output path for generated bundles + publicPath: '/dist/', // URL base path for all assets + chunkFilename: '[name].js' + }, entry: path.resolve(__dirname, 'src/converse.js'), externals: [{ "window": "window" @@ -148,36 +153,11 @@ function parameterize () { const type = minimist(process.argv.slice(2)).type; const mode = minimist(process.argv.slice(2)).mode; const lang = minimist(process.argv.slice(2)).lang; - if (type === 'headless') { console.log("Making a headless build"); config.entry = "@converse/headless/headless.js"; config.output.filename = 'converse-headless.js'; } - - if (type === 'nodeps') { - console.log("Making a build without 3rd party dependencies"); - config.output.filename = 'converse-no-dependencies.js'; - config.externals = [{ - "backbone": "backbone", - "backbone.nativeview": "backbone.nativeview", - "backbone.vdomview": "backbone.vdomview", - "backbone.browserStorage": "backbone.browserStorage", - "backbone.overview": "backbone.overview", - "es6-promise": "es6-promise", - "lodash": "lodash", - "lodash.converter": "lodash.converter", - "lodash.noconflict": "lodash.noconflict", - "strophe": "strophe", - "window": "window" - }]; - } - - if (mode === 'production') { - console.log("Making a production build"); - const fn = config.output.filename; - config.output.filename = `${fn.replace(/\.js$/, '')}.min.js`; - } } parameterize(); diff --git a/webpack.nodeps.js b/webpack.nodeps.js index ed0a8ba70..1387e4d9e 100644 --- a/webpack.nodeps.js +++ b/webpack.nodeps.js @@ -55,7 +55,6 @@ module.exports = merge(common, { "es6-promise": "es6-promise", "formdata-polyfill": "formdata-polyfill", "lodash": "lodash", - "lodash.converter": "lodash.converter", "lodash.noconflict": "lodash.noconflict", "strophe": "strophe", "window": "window", diff --git a/webpack.prod.js b/webpack.prod.js index fc921d9e9..cf0f64c1d 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -6,10 +6,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = merge(common, { output: { - path: path.resolve(__dirname, 'dist'), // Output path for generated bundles - publicPath: '/dist/', // URL base path for all assets filename: 'converse.min.js', - chunkFilename: '[name].js' }, plugins: [ new MiniCssExtractPlugin({filename: '../dist/converse.min.css'})