Commit a276a050 authored by JC Brand's avatar JC Brand

Avoid `main.js` being generated in `dist`

when were generating only the CSS
parent 0e7d6481
......@@ -11,12 +11,12 @@
"README.md"
],
"scripts": {
"converse.css": "webpack --type=css --mode=development",
"converse.css": "webpack --type=css --mode=development && rm -r tmp",
"converse.min.css": "npm run converse.css && cleancss --skip-rebase dist/converse.css > dist/converse.min.css",
"converse.js": "webpack --mode=development",
"converse.min.js": "npm run converse.js && webpack --mode=production",
"converse-headless.js": "webpack --mode=development --type=headless",
"converse-headless.min.js": "npm run converse-headless.css && webpack --mode=production --type=headless",
"converse-headless.min.js": "npm run converse-headless.js && webpack --mode=production --type=headless",
"clean": "rm -rf node_modules stamp-npm dist *.zip",
"build": "npm run converse.min.css && npm run converse-headless.min.js && npm run converse.min.js",
"prepare": "npm run build"
......
......@@ -15,7 +15,7 @@ const config = {
filename: 'converse.js'
},
devtool: 'source-map',
plugins: [new MiniCssExtractPlugin({filename: './converse.css'})],
plugins: [new MiniCssExtractPlugin({filename: '../dist/converse.css'})],
module: {
rules: [
{
......@@ -60,7 +60,7 @@ const config = {
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
outputPath: './'
outputPath: '../dist/'
}
}
]
......@@ -184,7 +184,10 @@ function parameterize () {
if (type === 'css') {
console.log("Building only CSS");
config.entry = path.resolve(__dirname, 'sass/converse.scss');
config.output = {};
config.output = {
path: path.resolve(__dirname, 'tmp'),
filename: 'css-builder.js'
}
}
if (mode === 'production') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment