fimfic2epub/webpack.config.babel.js

40 lines
784 B
JavaScript
Raw Normal View History

2016-06-21 09:04:08 +12:00
'use strict'
2016-06-21 18:39:26 +12:00
import path from 'path'
2016-06-21 09:04:08 +12:00
let inProduction = process.env.NODE_ENV === 'production' || process.argv.indexOf('-p') !== -1
export default {
2016-06-21 18:39:26 +12:00
entry: {
fimfic2epub: ['./src/main']
},
output: {
path: path.join(__dirname, '/'),
filename: './extension/[name].js'
},
module: {
loaders: [
{
test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: {
sourceMaps: inProduction,
presets: ['es2015'],
plugins: ['transform-strict-mode']
}
}
],
noParse: [
/[\/\\]node_modules[\/\\]tidy-html5[\/\\]tidy\.js$/
]
},
2016-06-21 09:04:08 +12:00
2016-06-21 18:39:26 +12:00
resolve: {
extensions: ['', '.js', '.json'],
root: [path.join(__dirname, '/src')]
},
2016-06-21 09:04:08 +12:00
2016-06-21 18:39:26 +12:00
plugins: [],
2016-06-21 09:04:08 +12:00
2016-06-21 18:39:26 +12:00
devtool: 'inline-source-map',
debug: true
2016-06-21 09:04:08 +12:00
}