Original Discussion: https://www.pika.dev/npm/snowpack/discuss/63
/cc @dy, @FredKSchott
As reported in the original discussion, our import scanner will check imports against your list of dependencies to see if its a package name vs. a file. This is fine for most cases, but some people directly rely on collections of dependencies (material-components-web) instead of individual dependencies.
We could improve this to just check the import itself. If an import is of the form web_modules/X.js or web_modules/@X/Y.js, then we should be fairly certain that it's a package and not a file within a package. This should actually simplify things, so that we don't need to worry about knownDependencies like we currently do.
Ah junk. I was scared of this happening.
If an import is of the form web_modules/X.js or web_modules/@X/Y.js, then we should be fairly certain that it's a package and not a file within a package. This should actually simplify things, so that we don't need to worry about knownDependencies like we currently do.
That makes sense to me! I鈥檓 happy to let someone else take this issue if possible (happy to provide guidance). Or I can open a PR if there aren鈥檛 any takers.
Feel free to take it if you have the time, you probably know this logic better than anyone :)