Skip to content

Commit

Permalink
Task: remove uneeded configs
Browse files Browse the repository at this point in the history
process.env.NODE_ENV will be automatically set already based on minify
https://esbuild.github.io/api/#platform

and browserslist is ignored by esbuild evanw/esbuild#121
  • Loading branch information
mhsdesign committed Nov 24, 2022
1 parent ad19091 commit efb9ef3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,5 @@ require('esbuild').build({
],
define: {
// we dont declare `global = window` as we want to control everything and notice it, when something is odd

// handover the NODE_ENV to the to be bundled javascript
// used fx. in `react-dom/profiling.js` to check if we use minfied and treeshaked code in production
'process.env.NODE_ENV': JSON.stringify(env.isProduction ? 'production' : undefined)
}
})
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,5 @@
"workspaces": [
"packages/*"
],
"packageManager": "[email protected]",
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
"packageManager": "[email protected]"
}

0 comments on commit efb9ef3

Please sign in to comment.