Hi! 👋
Firstly, thanks for your work on this project! 🙂
The highlighted lines makes the app crash when building and bundling with webpack. This is the error I get when run the bundle.js SyntaxError: invalid assignment left-hand side You are reassigning the the env var, but the bundler does not understand that.
Thanks
Here is the diff that solved my problem:
diff --git a/node_modules/convert-lambda-to-express/dist/devServer.js b/node_modules/convert-lambda-to-express/dist/devServer.js
index 2a6fae2..3b67166 100644
--- a/node_modules/convert-lambda-to-express/dist/devServer.js
+++ b/node_modules/convert-lambda-to-express/dist/devServer.js
@@ -174,11 +174,10 @@ function getDevServer(config) {
exports.getDevServer = getDevServer;
function startDevServer(config = {}) {
var _a, _b;
- if (config.prod) {
- process.env.NODE_ENV = 'production';
- }
- else if (process.env.NODE_ENV === 'production') {
+ if (process.env.NODE_ENV === 'production') {
config.prod = true;
+ } else {
+ config.prod = false;
}
const port = (_a = config.port) !== null && _a !== void 0 ? _a : 3001;
const hotReload = (_b = config.hotReload) !== null && _b !== void 0 ? _b : true;
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
The highlighted lines makes the app crash when building and bundling with webpack. This is the error I get when run the
bundle.jsSyntaxError: invalid assignment left-hand side You are reassigning the the env var, but the bundler does not understand that.Thanks
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.