mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
23 lines
585 B
JavaScript
23 lines
585 B
JavaScript
const path = require('path')
|
|
const webpack = require('webpack')
|
|
|
|
module.exports = {
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'resources/assets/js'),
|
|
'#': path.resolve(__dirname, 'resources/assets/sass')
|
|
}
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
KOEL_ENV: '"web"',
|
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development')
|
|
})
|
|
]
|
|
}
|
|
|
|
// test specific setups
|
|
if (process.env.NODE_ENV === 'test') {
|
|
module.exports.externals = [require('webpack-node-externals')()]
|
|
module.exports.devtool = 'inline-cheap-module-source-map'
|
|
}
|