fimfic2epub/webpack.config.babel.js

47 lines
875 B
JavaScript
Raw Normal View History

2016-06-21 09:04:08 +12:00
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
2016-06-21 09:04:08 +12:00
export default {
2016-06-21 18:39:26 +12:00
entry: {
2016-06-22 21:54:37 +12:00
fimfic2epub: ['./src/main'],
eventPage: ['./src/eventPage']
2016-06-21 18:39:26 +12:00
},
output: {
path: path.join(__dirname, '/'),
filename: './extension/[name].js'
},
module: {
loaders: [
/*
2016-06-21 18:39:26 +12:00
{
test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: {
sourceMaps: inProduction
2016-06-21 18:39:26 +12:00
}
2016-06-21 21:32:49 +12:00
},
*/
2016-06-21 21:32:49 +12:00
{
test: /\.styl$/,
loader: 'raw-loader!stylus-loader'
2016-06-21 18:39:26 +12:00
}
],
noParse: [
/[\/\\]node_modules[\/\\]tidy-html5[\/\\]tidy\.js$/
]
},
2016-06-21 09:04:08 +12:00
2016-06-21 18:39:26 +12:00
resolve: {
2016-06-21 21:32:49 +12:00
extensions: ['', '.js', '.json', '.styl'],
2016-06-23 02:30:10 +12:00
modules: [
path.resolve('./src'),
'node_modules'
]
2016-06-21 18:39:26 +12:00
},
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
}