Skip to content

Commit

Permalink
fix(cli): define process.env.NODE_ENV to "production" & bundle in…
Browse files Browse the repository at this point in the history
… ESNext (#424)
  • Loading branch information
QuiiBz authored Dec 27, 2022
1 parent 047b7ce commit 6384939
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-hats-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/cli': patch
---

Bundle in ESNext
5 changes: 5 additions & 0 deletions .changeset/tricky-cups-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/cli': patch
---

Define process.env.NODE_ENV as "production"
4 changes: 3 additions & 1 deletion packages/cli/src/utils/deployments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ pub fn delete_function_config(file: &Path) -> Result<()> {
fn esbuild(file: &PathBuf) -> Result<Vec<u8>> {
let result = Command::new("esbuild")
.arg(file)
.arg("--define:process.env.NODE_ENV=\"production\"")
.arg("--bundle")
.arg("--format=esm")
.arg("--target=es2020")
.arg("--target=esnext")
.arg("--platform=browser")
.arg("--conditions=lagon")
.arg("--loader:.wasm=binary")
.output()?;

Expand Down

4 comments on commit 6384939

@vercel
Copy link

@vercel vercel bot commented on 6384939 Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dashboard – ./packages/dashboard

dash.lagon.app
dashboard-lagon.vercel.app
dashboard-git-main-lagon.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 6384939 Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

www – ./www

www-lagon.vercel.app
www-git-main-lagon.vercel.app
lagon.app

@vercel
Copy link

@vercel vercel bot commented on 6384939 Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

storybook – ./packages/ui

storybook-lagon.vercel.app
ui.lagon.app
storybook-swart-eight.vercel.app
storybook-git-main-lagon.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 6384939 Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./packages/docs

docs-lagon.vercel.app
docs.lagon.app
docs-git-main-lagon.vercel.app
lagon-docs.vercel.app

Please sign in to comment.