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: {
|
|
|
|
path: path.resolve(__dirname, 'dist'), // Output path for generated bundles
|
|
|
|
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
|
|
|
chunkFilename: '[name].js'
|
|
|
|
},
|
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
|
|
|
});
|
|
|
|
|