immerjs / immerjs/immer

Please remove `process.env.NODE_ENV` in `dist/immer.mjs`

Open
#1,141 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
Dominant language
JavaScript
Stars
29k
Forks
881
PR merge metrics
No merged PRs in 30d

Description

🚀 Feature Proposal

I use import { produce } from 'immer' in vite project. After building, process.env.NODE_ENV is still in my built file.

Motivation

Could process.env.NODE_ENV be removed in dist/immer.mjs?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated dist/immer.mjs file and reproduce the Vite build described in the issue using the import { produce } from 'immer' entry point. Trace the package build output to identify where process.env.NODE_ENV remains, then verify that the built file no longer contains it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vite
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.