mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 04:05:57 +00:00
![Dan Brown](/assets/img/avatar_default.png)
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; |