8495a59e36
* delete unused files, move webpack configs to their own directory * start of improved developer documentation, moving everything to developer_docs/ directory * documentation updates
93 lines
No EOL
1.8 KiB
JavaScript
93 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'),
|
|
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/'),
|
|
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', {
|
|
'config': path.resolve(__dirname, './config.babel.js'),
|
|
"verbose": false
|
|
}
|
|
]
|
|
]
|
|
},
|
|
}
|
|
],
|
|
},
|
|
},
|
|
{
|
|
entry: path.resolve(__dirname, '../server/scripts/fetch-examples-gg.js'),
|
|
|
|
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: {
|
|
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
|
|
}
|
|
]
|
|
]
|
|
},
|
|
}
|
|
],
|
|
},
|
|
}]; |