ghost-portal/packages/ui-react-rx/webpack.config.js
Luke Schoen d7319e809b config: Enable source maps in development for front-end debugging (#84)
* config: Enable source maps in development for front-end debugging

* feat: Switch to source map for dev env as used by create react app
2018-06-13 09:18:35 +02:00

34 lines
677 B
JavaScript

// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';
module.exports = {
context: __dirname,
devtool: isProd ? 'source-map' : 'cheap-eval-source-map',
entry: './src/demo.js',
mode: ENV,
output: {
path: __dirname,
filename: './demo.js'
},
resolve: {
alias: {}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader'
}
}
]
},
plugins: []
};