2017-04-11 06:33:32 +10:00
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
target: 'node',
|
2018-03-15 22:07:22 +11:00
|
|
|
entry: ['./src/webpack-auto-inject.js'],
|
2017-04-11 06:33:32 +10:00
|
|
|
resolve: {
|
2018-03-15 18:55:41 +11:00
|
|
|
extensions: ['.js'],
|
2017-04-11 06:33:32 +10:00
|
|
|
},
|
|
|
|
output: {
|
2017-04-11 09:11:09 +10:00
|
|
|
filename: 'WebpackAutoInjectVersion.js',
|
|
|
|
path: path.resolve(process.cwd(), 'dist'),
|
2018-03-15 18:55:41 +11:00
|
|
|
libraryTarget: 'umd',
|
2017-04-11 06:33:32 +10:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
2017-04-13 07:32:39 +10:00
|
|
|
use: [
|
|
|
|
'babel-loader',
|
|
|
|
],
|
2017-04-11 06:33:32 +10:00
|
|
|
include: [
|
2018-03-15 18:55:41 +11:00
|
|
|
path.resolve('src'),
|
|
|
|
],
|
2017-04-11 06:33:32 +10:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.json$/,
|
2018-03-15 18:55:41 +11:00
|
|
|
loader: 'json-loader',
|
2017-04-11 06:33:32 +10:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.txt$/,
|
2018-03-15 18:55:41 +11:00
|
|
|
loader: 'raw-loader',
|
|
|
|
},
|
|
|
|
],
|
2017-04-11 06:33:32 +10:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
|
2018-03-15 18:55:41 +11:00
|
|
|
],
|
2017-04-11 06:33:32 +10:00
|
|
|
};
|