2019-08-23 14:23:12 +02:00
|
|
|
/* global __dirname, module */
|
2019-08-23 13:19:05 +02:00
|
|
|
const common = require("./webpack.common.js");
|
|
|
|
const merge = require("webpack-merge");
|
|
|
|
const path = require('path');
|
2019-08-23 14:23:12 +02:00
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
2019-08-23 13:19:05 +02:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
output: {
|
2019-09-12 12:10:50 +02:00
|
|
|
publicPath: '/dist/', // URL base path for all assets
|
2019-09-04 18:58:10 +02:00
|
|
|
filename: 'converse.min.js',
|
2019-08-23 13:19:05 +02:00
|
|
|
},
|
2019-08-23 14:23:12 +02:00
|
|
|
plugins: [
|
2019-09-04 18:58:10 +02:00
|
|
|
new MiniCssExtractPlugin({filename: '../dist/converse.min.css'})
|
2019-08-23 14:23:12 +02:00
|
|
|
],
|
2019-08-23 13:19:05 +02:00
|
|
|
mode: "production",
|
|
|
|
devtool: "source-map",
|
2019-08-23 14:23:12 +02:00
|
|
|
module: {
|
|
|
|
rules: [{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {sourceMap: true}
|
|
|
|
},
|
|
|
|
'postcss-loader',
|
|
|
|
{
|
|
|
|
loader: 'sass-loader',
|
|
|
|
options: {
|
|
|
|
includePaths: [
|
|
|
|
path.resolve(__dirname, 'node_modules/')
|
|
|
|
],
|
|
|
|
sourceMap: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
}
|
2019-08-23 13:19:05 +02:00
|
|
|
});
|
|
|
|
|