Comparing 0.38.3...0.38.4 · vercel/ncc (original) (raw)
Commits on Nov 18, 2024
Commits on Dec 3, 2024
Commits on Jan 17, 2025
Commits on Feb 14, 2025
- Configuration menu
Browse the repository at this point in the history - Configuration menu
Browse the repository at this point in the history - Configuration menu
Browse the repository at this point in the history
Commits on Mar 7, 2025
Commits on Apr 9, 2025
- Configuration menu
Browse the repository at this point in the history - Configuration menu
Browse the repository at this point in the history
Commits on Apr 21, 2025
Commits on Jun 24, 2025
Commits on Jul 29, 2025
Commits on Aug 6, 2025
Commits on Aug 21, 2025
- Configuration menu
Browse the repository at this point in the history - Configuration menu
Browse the repository at this point in the history
Commits on Sep 2, 2025
- Configuration menu
Browse the repository at this point in the history - Configuration menu
Browse the repository at this point in the history
Commits on Sep 18, 2025
Purpose
A while ago, a PR was merged
to disable import.meta evaluation altogether to support new versions
of Webpack. This sometimes causes issues in CJS projects.
In the comments, there were some
[discussions](#897 (comment))
about whether we should have a conditional and keep the previous
behavior for CJS builds. This PR addresses exactly this by translatingimport.meta.url to a CJS compatible statement which results to the
same output.
I have created a comparative
build between two
projects using the same code and a dependency (@sentry/node) that usesimport.meta.url. You can see the difference in the output index.js
Before the change:
const importMetaUrl = typeof import.meta.url !== 'undefined' ? import.meta.url : undefined; After:
const importMetaUrl = typeof require("url").pathToFileURL(__filename).href !== 'undefined' ? require("url").pathToFileURL(__filename).href : undefined; Closes #1019
Configuration menu
Browse the repository at this point in the history