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',
|
|
|
|
query: {
|
|
|
|
presets: [
|
|
|
|
'react',
|
|
|
|
'env',
|
|
|
|
'stage-0',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
'babel-plugin-webpack-loaders', {
|
2018-09-26 20:14:06 +00:00
|
|
|
'config': path.resolve(__dirname, './config.babel.js'),
|
2018-06-14 00:40:46 +00:00
|
|
|
"verbose": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
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',
|
|
|
|
query: {
|
|
|
|
presets: [
|
|
|
|
'react',
|
|
|
|
'env',
|
|
|
|
'stage-0',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
'babel-plugin-webpack-loaders', {
|
|
|
|
'config': path.resolve(__dirname, './config.babel.js'),
|
|
|
|
"verbose": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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',
|
|
|
|
query: {
|
|
|
|
presets: [
|
|
|
|
'react',
|
|
|
|
'env',
|
|
|
|
'stage-0',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
[
|
|
|
|
'babel-plugin-webpack-loaders', {
|
2018-09-26 20:14:06 +00:00
|
|
|
'config': path.resolve(__dirname, './config.babel.js'),
|
2018-06-14 00:40:46 +00:00
|
|
|
"verbose": false
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}];
|