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

Option 'includeAbsolutePaths' can't work well with inline loader #119

Open
licg9999 opened this issue Oct 14, 2022 · 0 comments
Open

Option 'includeAbsolutePaths' can't work well with inline loader #119

licg9999 opened this issue Oct 14, 2022 · 0 comments

Comments

@licg9999
Copy link

Hi, there. I found an interesting case that can be consistently reproduced. If I specify option 'includeAbsolutePaths' and use an inline loader which contains a sub path '/node_modules/', webpack-node-externals would mistakenly externalize the target file that should be imported. For example:

// webpack.config.js
...
  externals: [nodeExternals({ includeAbsolutePaths: true })],
...
// entry file
import { greeting } from '!../node_modules/babel-loader/lib/index.js!./constants';

In this case, the file constants should be imported but in fact it's externalized. I created a repo licg9999/b6881284 so that you can reproduce the abnormally. Would you help fix it? Or do you mind my fixing it? Thanks.

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

No branches or pull requests

1 participant