8054a532d7
* remove some of the react errors, start to fix webpack HMR errors * start upgrade to webpack 4 * more stuff to update webpack * update webpack configs to work with webpack 4 * remove linting from truncate script
102 lines
No EOL
1.8 KiB
JavaScript
102 lines
No EOL
1.8 KiB
JavaScript
const path = require('path');
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
module.exports = [{
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples.js'),
|
|
mode: 'production',
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
filename: 'fetch-examples.bundle.js'
|
|
},
|
|
|
|
target: 'node',
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
resolve: {
|
|
extensions: ['*', '.js', '.jsx'],
|
|
modules: [
|
|
'client',
|
|
'node_modules',
|
|
],
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
babelrc: true
|
|
}
|
|
}
|
|
],
|
|
},
|
|
},
|
|
{
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-gg.js'),
|
|
mode: 'production',
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
filename: 'fetch-examples-gg.bundle.js'
|
|
},
|
|
|
|
target: 'node',
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
resolve: {
|
|
extensions: ['*', '.js', '.jsx'],
|
|
modules: [
|
|
'client',
|
|
'node_modules',
|
|
],
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
babelrc: true
|
|
}
|
|
}
|
|
],
|
|
},
|
|
},
|
|
{
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-ml5.js'),
|
|
mode: 'production',
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
filename: 'fetch-examples-ml5.bundle.js'
|
|
},
|
|
|
|
target: 'node',
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
resolve: {
|
|
extensions: ['*', '.js', '.jsx'],
|
|
modules: [
|
|
'client',
|
|
'node_modules',
|
|
],
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
options: {
|
|
babelrc: true
|
|
}
|
|
}
|
|
],
|
|
},
|
|
}]; |