What version of Remix are you using?
1.19.3
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Check this repo: https://github.com/ABuffSeagull/remix-node-tree-shake-bug
It's just importing 2 builtin modules: node:assert/strict and node:process. node:assert/strict is used directly in the loader, while node:process is exported from another file (notably not a .server.ts file).
This happens with basically every node builtin, with and without the node: prefix, as far as I can tell.
Expected Behavior
Both node:assert/strict and node:process should be completely eliminated from the browser bundles.
Actual Behavior
Only node:process is eliminated from the browser bundle. node:assert/strict is still being polyfilled.
What version of Remix are you using?
1.19.3
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Check this repo: https://github.com/ABuffSeagull/remix-node-tree-shake-bug
It's just importing 2 builtin modules:
node:assert/strictandnode:process.node:assert/strictis used directly in the loader, whilenode:processis exported from another file (notably not a.server.tsfile).This happens with basically every node builtin, with and without the
node:prefix, as far as I can tell.Expected Behavior
Both
node:assert/strictandnode:processshould be completely eliminated from the browser bundles.Actual Behavior
Only
node:processis eliminated from the browser bundle.node:assert/strictis still being polyfilled.