p5.js-web-editor/webpack/config.server.js
Cassie Tarakajian 8495a59e36
Development documentation (#705)
* delete unused files, move webpack configs to their own directory

* start of improved developer documentation, moving everything to developer_docs/ directory

* documentation updates
2018-09-26 16:14:06 -04:00

57 lines
No EOL
1.1 KiB
JavaScript

const fs = require('fs');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: path.resolve(__dirname, '../server/server.js'),
output: {
path: path.resolve(__dirname, '../dist/'),
filename: 'server.bundle.js',
},
target: 'node',
node: {
__filename: true,
__dirname: true,
},
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
}
]
]
},
}, {
test: /\.json$/,
loader: 'json-loader',
},
],
},
};