Closed ca-d closed 3 years ago
It's seems like too late to check this issue, but I think I just found what's problem.
@zhoukekestar , the regular expression in esmImportRegex.js isn't working properly if there is more than 1 slash.
Also checked that:
Update: I think it is safe to fix that regex if the CDN provider is Skypack.
Both are working URL(s):
However, in regex, I think providing the information of sub-file of the package to getCdnUrl
function would be nice.
In, the latest version, 1.1.3, as the regular expression finally updated to accept those cases. I am going to close the issue as regex problem resolved.
Some packages are missed by the plugin when building, compiling them into the
web_packages
directory instead of replacing bare improt specifiers by the corresponding skypack cdn link.Specifically, even though almost all
@material/mwc-*
WebComponents we use get translated to skypack links, this is not the case for@material/mwc-button
and@material/mwc-list/mwc-list-item
. We can get@material/mwc-button
to be translated correctly by including it explicitly in our"imports"
config in addition to"*": true
, but there is no way for us to getmwc-list-item
to work, with or without the.js
extension on the bare import specifier, even though the deep import is available from skypack, and the same is true for thelit-html
directives.What we do
We use this
snowpack
configuration section in ourpackage.json
file:npx snowpack build
What we expect
What we get
grep web_modules build/src/**/*.js
What we expect
no output
What we get