2018-06-14 00:40:46 +00:00
|
|
|
const path = require('path');
|
|
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
|
|
|
|
module.exports = [{
|
2018-09-26 20:14:06 +00:00
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples.js'),
|
2018-06-14 00:40:46 +00:00
|
|
|
|
|
|
|
output: {
|
2018-09-26 20:14:06 +00:00
|
|
|
path: path.resolve(__dirname, '../dist/'),
|
2018-06-14 00:40:46 +00:00
|
|
|
filename: 'fetch-examples.bundle.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
target: 'node',
|
|
|
|
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 16:05:31 +00:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2018-06-14 00:40:46 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2018-09-26 20:14:06 +00:00
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-gg.js'),
|
2018-06-14 00:40:46 +00:00
|
|
|
|
|
|
|
output: {
|
2018-09-26 20:14:06 +00:00
|
|
|
path: path.resolve(__dirname, '../dist/'),
|
2018-06-14 00:40:46 +00:00
|
|
|
filename: 'fetch-examples-gg.bundle.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
target: 'node',
|
|
|
|
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2019-05-02 19:12:06 +00:00
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 16:05:31 +00:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2019-05-02 19:12:06 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-ml5.js'),
|
|
|
|
|
|
|
|
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 00:40:46 +00:00
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2019-06-05 16:05:31 +00:00
|
|
|
options: {
|
|
|
|
babelrc: true
|
|
|
|
}
|
2018-06-14 00:40:46 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}];
|