Nx
Enterprise
Nx
Sign in / Sign up
Open main menu
Nx
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
master
205daee6 fix(webpack): interpolate process.env more verbosely to reduce bundle size with DefinePlugin (#30826) ## Current Behavior When we prepare ENVs for the DefinePlugin, we are creating the `process.env` object. For example: ``` // .env NX_PUBLIC_VALUE1=1 NX_PUBLIC_VALUE2=2 NX_PUBLIC_VALUE3=3 ``` As result we will have: ```js { 'process.env': { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" } } ``` As a result, in the final bundle, we will replace process.env with this object. The issue: If I use all 3 values in my application DefinePlugin will inject this object 3 times, instead of injecting it once. It will look like that: ```js const a = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE1 const b = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE2 const c = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE3 ``` ## Expected Behavior DefinePlugin injects values instead of env object in each place ```js const a = "1" const b = "2" const c = "3" ``` ## Fixes - fixed this issue for webpack - fixed this issue for storybook - fixed this issue for rspack TLDR: now we have object like so: ```js { "process.env.NX_PUBLIC_VALUE1": "1", "process.env.NX_PUBLIC_VALUE2": "2", "process.env.NX_PUBLIC_VALUE3": "3" } ``` --------- Co-authored-by: Colum Ferry <cferry09@gmail.com>
3 days ago
by coolassassin
c
Succeeded
master
205daee6 fix(webpack): interpolate process.env more verbosely to reduce bundle size with DefinePlugin (#30826) ## Current Behavior When we prepare ENVs for the DefinePlugin, we are creating the `process.env` object. For example: ``` // .env NX_PUBLIC_VALUE1=1 NX_PUBLIC_VALUE2=2 NX_PUBLIC_VALUE3=3 ``` As result we will have: ```js { 'process.env': { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" } } ``` As a result, in the final bundle, we will replace process.env with this object. The issue: If I use all 3 values in my application DefinePlugin will inject this object 3 times, instead of injecting it once. It will look like that: ```js const a = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE1 const b = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE2 const c = { "NX_PUBLIC_VALUE1": "1", "NX_PUBLIC_VALUE2": "2", "NX_PUBLIC_VALUE3": "3" }.NX_PUBLIC_VALUE3 ``` ## Expected Behavior DefinePlugin injects values instead of env object in each place ```js const a = "1" const b = "2" const c = "3" ``` ## Fixes - fixed this issue for webpack - fixed this issue for storybook - fixed this issue for rspack TLDR: now we have object like so: ```js { "process.env.NX_PUBLIC_VALUE1": "1", "process.env.NX_PUBLIC_VALUE2": "2", "process.env.NX_PUBLIC_VALUE3": "3" } ``` --------- Co-authored-by: Colum Ferry <cferry09@gmail.com>
4 days ago
by coolassassin
c
Failed
30826
936f99ad fix(rspack): define each environment key separately
4 days ago
by coolassassin
c
Failed
30826
d4fc5bde fix(rspack): define each environment key separately
4 days ago
by coolassassin
c
Previous page
Previous
Next
Next page