2018-06-14 02:40:46 +02:00
|
|
|
const path = require('path');
|
|
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
|
|
|
|
module.exports = [{
|
2018-09-26 22:14:06 +02:00
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples.js'),
|
2019-08-28 22:08:40 +02:00
|
|
|
mode: 'production',
|
2018-06-14 02:40:46 +02:00
|
|
|
output: {
|
2018-09-26 22:14:06 +02:00
|
|
|
path: path.resolve(__dirname, '../dist/'),
|
2018-06-14 02:40:46 +02:00
|
|
|
filename: 'fetch-examples.bundle.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
target: 'node',
|
|
|
|
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
module: {
|
2019-08-28 22:08:40 +02:00
|
|
|
rules: [
|
2018-06-14 02:40:46 +02:00
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 18:05:31 +02:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2018-06-14 02:40:46 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2018-09-26 22:14:06 +02:00
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-gg.js'),
|
2019-08-28 22:08:40 +02:00
|
|
|
mode: 'production',
|
2018-06-14 02:40:46 +02:00
|
|
|
output: {
|
2018-09-26 22:14:06 +02:00
|
|
|
path: path.resolve(__dirname, '../dist/'),
|
2018-06-14 02:40:46 +02:00
|
|
|
filename: 'fetch-examples-gg.bundle.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
target: 'node',
|
|
|
|
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2019-05-02 21:12:06 +02:00
|
|
|
module: {
|
2019-08-28 22:08:40 +02:00
|
|
|
rules: [
|
2019-05-02 21:12:06 +02:00
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 18:05:31 +02:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2019-05-02 21:12:06 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-ml5.js'),
|
2019-08-28 22:08:40 +02:00
|
|
|
mode: 'production',
|
2019-05-02 21:12:06 +02:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
|
|
filename: 'fetch-examples-ml5.bundle.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
target: 'node',
|
|
|
|
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2018-06-14 02:40:46 +02:00
|
|
|
module: {
|
2019-08-28 22:08:40 +02:00
|
|
|
rules: [
|
2018-06-14 02:40:46 +02:00
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 18:05:31 +02:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2018-06-14 02:40:46 +02:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}];
|