-
Notifications
You must be signed in to change notification settings - Fork 18
Allow future extensions without package.json#type
field
#38
Comments
can you expand on why? what's stopping us from just adding more supported formats to the esm loader? |
It would be a breaking change because they have been forwarded to the CommonJS pipeline before. If somebody has their own custom HTML |
Do you mind explaining where this is happening? As far as I understand the implementation, |
Unknown extensions should fail outright, just like they do now - nothing should be "forwarded" to the CommonJS pipeline without an explicit indicator that it's CJS. |
import "some-dep/foo.zapp"; Afaict this make us load a file with extension |
Seems like "if/else" isn't the logic we wan't; if it's unknown imo it should throw. |
|
If |
i'm fairly sure the eventual plan is to have the main loader be the esm loader, which would call into cjs for cjs, and handle everything else itself. |
Is this an issue that can be closed at this time? Or transfered to the main repository? |
In a package without additional boilerplate (e.g. "type" field), we currently default to treating unknown extensions as CommonJS. This means that we won't be able to support any future extensions (
.wasm
,.html
, ...) unless they are handled by CommonJS.The text was updated successfully, but these errors were encountered: