mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 07:10:05 +02:00
40 lines
911 B
JavaScript
40 lines
911 B
JavaScript
|
const pkg = require('../package.json');
|
||
|
const webpack = require('webpack');
|
||
|
const path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
context: path.join(__dirname, '../src'),
|
||
|
output: {
|
||
|
path: path.join(__dirname, '../static'),
|
||
|
publicPath: '/static/',
|
||
|
filename: 'bundle.js'
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.NoErrorsPlugin(),
|
||
|
new webpack.DefinePlugin({
|
||
|
'process.env': {
|
||
|
NODE_ENV: JSON.stringify(process.env['NODE_ENV'] || 'development'),
|
||
|
APP_NAME: JSON.stringify(pkg.name),
|
||
|
APP_VERSION: JSON.stringify(pkg.version)
|
||
|
}
|
||
|
})
|
||
|
],
|
||
|
module: {
|
||
|
loaders: [{
|
||
|
test: /js?$/,
|
||
|
exclude: /node_modules/,
|
||
|
include: [
|
||
|
path.join(__dirname, '../src')
|
||
|
],
|
||
|
loaders: ['babel']
|
||
|
}, {
|
||
|
test: /\.json?$/,
|
||
|
exclude: /node_modules/,
|
||
|
include: [
|
||
|
path.join(__dirname, '../src')
|
||
|
],
|
||
|
loaders: ['json']
|
||
|
}]
|
||
|
}
|
||
|
};
|