p5.js-web-editor/index.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

27 lines
902 B
JavaScript

if (process.env.NODE_ENV === 'production') {
process.env.webpackAssets = JSON.stringify(require('./dist/static/manifest.json'));
process.env.webpackChunkAssets = JSON.stringify(require('./dist/static/chunk-manifest.json'));
require('./dist/server.bundle.js');
} else {
let parsed = require('dotenv').config();
require('babel-register')({
"plugins": [
[
"babel-plugin-webpack-loaders",
{
"config": "./webpack/config.babel.js",
"verbose": false
}
]
]
});
require('babel-polyfill');
//// in development, let .env values override those in the environment already (i.e. in docker-compose.yml)
// so commenting this out makes the docker container work.
// if (process.env.NODE_ENV === 'development') {
// for (let key in parsed) {
// process.env[key] = parsed[key];
// }
// }
require('./server/server');
}