angular-barcode-scanner
Version:
An angular barcode reader module
45 lines (43 loc) • 1.06 kB
JavaScript
// webpack.config.js
import webpack from 'webpack';
import path from 'path';
const libraryName = 'angular-barcode-scanner';
const outputFile = libraryName + '.js';
export default {
eslint: {
configFile: '.eslintrc.json',
fix: false
},
entry: __dirname + '/src/index.js',
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: outputFile,
library: libraryName,
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
preLoaders: [
{test: /\.js$/, loader: 'eslint-loader', exclude: /node_modules/}
],
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['ng-annotate', 'babel-loader']
}
]
},
resolve: {
root: path.resolve('./src'),
extensions: ['', '.js']
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};