mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 09:42:10 +08:00
540119f133
Moving sass out of webpack cleans the setup quite considerably and brings a good speed improvement. Made use of npm-run-all so the previous commands still run like before.
20 lines
415 B
JavaScript
20 lines
415 B
JavaScript
const path = require('path');
|
|
const dev = process.env.NODE_ENV !== 'production';
|
|
|
|
const config = {
|
|
target: 'web',
|
|
mode: dev? 'development' : 'production',
|
|
entry: {
|
|
app: './resources/js/index.js',
|
|
},
|
|
output: {
|
|
filename: '[name].js',
|
|
path: path.resolve(__dirname, 'public/dist')
|
|
},
|
|
};
|
|
|
|
if (dev) {
|
|
config['devtool'] = 'inline-source-map';
|
|
}
|
|
|
|
module.exports = config; |