Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The entry point C:\\Users\\...\\node_modules\\...\\index.ts cannot be marked as external #42

Closed
timheerwagen opened this issue Apr 27, 2024 · 5 comments · Fixed by #43 or #44
Closed
Labels

Comments

@timheerwagen
Copy link

Since ^4.0.3 it is no longer possible to bundle files from the node_modules. This can happen because the path is marked as external by args.path.match(PATH_NODE_MODULES_RE), even if it has been declared as non-external with the external option.

I use the default configuration:

await bundleRequire({
        filepath: indexPath, // Absolute path, something like C:\\Users\\...\\node_modules\\...\\index.ts
})
Copy link

github-actions bot commented May 2, 2024

🎉 This issue has been resolved in version 4.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@timheerwagen
Copy link
Author

This is not fixed in 4.0.4 (#43)

The cause was not the Windows path, but that the file is marked as external although it is the filepath if it is located in node_modules.

It worked perfectly in 4.0.2 and below.

Copy link

github-actions bot commented May 2, 2024

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@egoist
Copy link
Owner

egoist commented May 2, 2024

This should be fixed, now it's controlled by externalNodeModules option, which is false by default when your filepath is in node_modules

@timheerwagen
Copy link
Author

I can confirm that the problem is fixed in 4.1.0. Thanks for the great work! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants