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",
|
2022-05-05 07:03:23 +02:00
|
|
|
entry: {
|
|
|
|
"converse-no-dependencies": path.resolve(__dirname, "../src/entry.js"),
|
2019-08-23 17:09:39 +02:00
|
|
|
},
|
|
|
|
plugins: [
|
2021-06-25 10:38:38 +02:00
|
|
|
new MiniCssExtractPlugin({filename: 'tmp.css'})
|
2019-08-23 17:09:39 +02:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader',
|
|
|
|
{
|
|
|
|
loader: 'sass-loader',
|
|
|
|
options: {
|
2020-04-13 11:45:02 +02:00
|
|
|
sassOptions: {
|
2022-01-27 12:07:52 +01:00
|
|
|
includePaths: [path.resolve(__dirname, '../node_modules/')]
|
2020-04-13 11:45:02 +02:00
|
|
|
}
|
2019-08-23 17:09:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
externals: [{
|
2021-03-17 09:34:00 +01:00
|
|
|
'pluggable.js': 'pluggable',
|
|
|
|
'@converse/skeletor': 'skeletor',
|
|
|
|
'localforage': 'localforage',
|
|
|
|
'filesize': 'filesize',
|
|
|
|
'jed': 'jed',
|
|
|
|
'lodash': 'lodash',
|
|
|
|
'lodash.noconflict': 'lodash.noconflict',
|
|
|
|
'sizzle': 'sizzle',
|
|
|
|
'strophe.js': 'strophe',
|
|
|
|
'urijs': 'urijs',
|
|
|
|
'window': 'window',
|
2019-08-23 17:09:39 +02:00
|
|
|
}]
|
|
|
|
});
|