🐛 Webpack entry: {name: './extension-less-file'}
not supported
#949
Labels
bug
Something isn't working
entry: {name: './extension-less-file'}
not supported
#949
Prerequisites
Reproduction url
Non-minimal repro: https://github.com/pixiebrix/pixiebrix-extension/blob/92cbf5c2c132fc5618be7f0855266daac99f1f88/webpack.config.mjs#L112-L142
Reproduction access
Description of the issue
I'm creating some issues for tracking the bugs I found. I'll minimize the repro as necessary.
I reported this a year ago, but the reason was not immediately clear because knip does not report invalid entry points (this seems to be a common cause for trouble).
If
webpack.config.js
exports this, knip can't resolve thembut it works if I add the extensions:
I think webpack can resolve certain extensions natively (.js) but extra config may be required to resolve .ts and .tsx. This works correctly in webpack:
You can see extension-less entries in the docs: https://webpack.js.org/configuration/entry-context/#dynamic-entry
The text was updated successfully, but these errors were encountered: