CodiceFiscaleJS/webpack.config.js
2017-12-19 09:36:43 +01:00

35 lines
627 B
JavaScript

const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: {
'codice.fiscale': './src/index.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['babel-preset-env']
}
}
}
]
},
plugins: [
new webpack
.optimize
.UglifyJsPlugin()
]
}