chore(learn): Merge learn in to the client app
This commit is contained in:
39
client/webpack-frame-runner.js
Normal file
39
client/webpack-frame-runner.js
Normal file
@ -0,0 +1,39 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = (env = {}) => {
|
||||
const __DEV__ = env.production !== true;
|
||||
return {
|
||||
mode: __DEV__ ? 'development' : 'production',
|
||||
entry: './src/client/frame-runner.js',
|
||||
devtool: __DEV__ ? 'inline-source-map' : 'source-map',
|
||||
output: {
|
||||
filename: 'frame-runner.js',
|
||||
path: path.join(__dirname, './static/js')
|
||||
},
|
||||
stats: {
|
||||
// Display bailout reasons
|
||||
optimizationBailout: true
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
include: [path.join(__dirname, 'src/client/')],
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
babelrc: false,
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{ modules: false, targets: '> 0.25%, not dead' }
|
||||
]
|
||||
],
|
||||
plugins: ['@babel/plugin-transform-runtime']
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user