webpack-auto-inject-version/tools/webpack.conf.js

48 lines
852 B
JavaScript
Raw Normal View History

2017-04-11 06:33:32 +10:00
import path from 'path';
export default {
target: 'node',
2017-04-13 06:53:56 +10:00
entry: ['babel-polyfill', './src/main.js'],
2017-04-11 06:33:32 +10:00
resolve: {
extensions: ['.js']
},
output: {
2017-04-11 09:11:09 +10:00
filename: 'WebpackAutoInjectVersion.js',
path: path.resolve(process.cwd(), 'dist'),
libraryTarget: 'umd'
2017-04-11 06:33:32 +10:00
},
module: {
// rules: [
// { // eslint feature
// enforce: 'pre',
// test: /\.js$/,
// loader: 'eslint-loader',
// exclude: /node_modules/
// }
// ],
loaders: [
{
test: /\.js$/,
2017-04-13 07:32:39 +10:00
use: [
'babel-loader',
'eslint-loader'
],
2017-04-11 06:33:32 +10:00
include: [
path.resolve('src')
]
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.txt$/,
loader: 'raw-loader'
}
]
},
plugins: [
]
};