-
Notifications
You must be signed in to change notification settings - Fork 192
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
Allow directories in exports field of package.json #256
Comments
/cc @vankop |
This should work. Could you provide a repro? |
Demo added |
@zerkalica |
@evilebottnawi What do you mean? https://nodejs.org/api/packages.html#packages_package_entry_points
|
@zerkalica Can you reproduce this without ts? |
I include ts build into git repository, you can run |
@zerkalica Why do you use |
Using exports != using esm. Extensions doesn't required in commonjs |
@zerkalica yep, I known, just for information |
@evilebottnawi Our infrastructure not ready or it, legacy code with lot of |
This issue needs to be triaged and prioritized. I don't use webpack v5 myself yet but I'm getting reports people are unable to use Webpack v5 to bundle
It's perfectly valid for a CJS module to Recalling off my head some other packages with a similar pattern that webpack v5 presumably won't bundle correctly:
|
/cc @vankop maybe you can help with this? |
Working on that |
…and aliases if fullySpecified is not specified fixes #256
Node.JS (> 12) allows directories in exports, this works:
But webpack 5 allows only file aliases
PS: Demo https://github.com/zerkalica/wp-exports-dir-bug
lib/b
Actual:
Module not found: Error: Can't resolve '@some/lib-a/a' in '.../wp-exports-dir-bug/lib/b/-'
Expecteed: no errors
To demonstrate, that node works, uncomment
'@some/lib-a/a': require.resolve('@some/lib-a/a')
in lib/b/webpack.config.jsActual and expected: no errors
The text was updated successfully, but these errors were encountered: