2019-08-23 17:09:39 +02:00
|
|
|
/* global module, __dirname */
|
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
const common = require("./webpack.common.js");
|
|
|
|
const path = require('path');
|
2020-08-16 22:53:24 +02:00
|
|
|
const { merge} = require("webpack-merge");
|
2019-08-23 17:09:39 +02:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
mode: "production",
|
|
|
|
output: {
|
|
|
|
filename: 'converse-no-dependencies.js'
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimizer: []
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new MiniCssExtractPlugin({filename: ''})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: [
|
|
|
|
["@babel/preset-env", {
|
|
|
|
"targets": {
|
|
|
|
"browsers": ["ie 8"]
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader',
|
|
|
|
{
|
|
|
|
loader: 'sass-loader',
|
|
|
|
options: {
|
2020-04-13 11:45:02 +02:00
|
|
|
sassOptions: {
|
|
|
|
includePaths: [path.resolve(__dirname, 'node_modules/')]
|
|
|
|
}
|
2019-08-23 17:09:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
externals: [{
|
|
|
|
"lodash": "lodash",
|
|
|
|
"lodash.noconflict": "lodash.noconflict",
|
|
|
|
"strophe": "strophe",
|
|
|
|
"window": "window",
|
|
|
|
"filesize": "filesize",
|
|
|
|
"jed": "jed",
|
|
|
|
"sizzle": "sizzle",
|
|
|
|
"twemoji": "twemoji",
|
|
|
|
"urijs": "urijs"
|
|
|
|
}]
|
|
|
|
});
|