p5.js-web-editor/index.js
Cassie Tarakajian 8054a532d7
Update to webpack 4 (#1145)
* remove some of the react errors, start to fix webpack HMR errors

* start upgrade to webpack 4

* more stuff to update webpack

* update webpack configs to work with webpack 4

* remove linting from truncate script
2019-08-28 16:08:40 -04:00

18 lines
667 B
JavaScript

if (process.env.NODE_ENV === 'production') {
process.env.webpackAssets = JSON.stringify(require('./dist/static/manifest.json'));
require('./dist/server.bundle.js');
} else {
let parsed = require('dotenv').config();
require('@babel/register')({
presets: ["@babel/preset-env"]
});
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');
}