2018-03-11 17:16:30 +01:00
|
|
|
const path = require('path');
|
|
|
|
const dev = process.env.NODE_ENV !== 'production';
|
|
|
|
|
|
|
|
const config = {
|
2018-03-17 16:20:15 +01:00
|
|
|
target: 'web',
|
2018-03-17 14:03:13 +01:00
|
|
|
mode: dev? 'development' : 'production',
|
2018-03-11 17:16:30 +01:00
|
|
|
entry: {
|
2019-09-07 00:36:16 +02:00
|
|
|
app: './resources/js/index.js',
|
2018-03-11 17:16:30 +01:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, 'public/dist')
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
if (dev) {
|
|
|
|
config['devtool'] = 'inline-source-map';
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = config;
|