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

39 lines
625 B
JavaScript
Raw Normal View History

2017-04-11 06:33:32 +10:00
import path from 'path';
export default {
target: 'node',
entry: ['./src/main.js'],
2017-04-11 06:33:32 +10:00
resolve: {
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'),
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: [
path.resolve('src'),
],
2017-04-11 06:33:32 +10:00
},
{
test: /\.json$/,
loader: 'json-loader',
2017-04-11 06:33:32 +10:00
},
{
test: /\.txt$/,
loader: 'raw-loader',
},
],
2017-04-11 06:33:32 +10:00
},
plugins: [
],
2017-04-11 06:33:32 +10:00
};