Open gwsbhqt opened 2 years ago
where you get the import https://esm.sh/v89/@douyinfe/semi-foundation@2.16.0/es2022/lib/es/popover/popover.css.js ?
save the following code as a .html suffix file and open it with your browser, and open the browser debugger to observe
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<body></body>
<script type="module">
import * as SemiUI from 'https://esm.sh/@douyinfe/semi-ui'
console.log(SemiUI)
</script>
</html>
After waiting for a period of time, you can observe that the files with the .js suffix are loaded successfully, but all the files with the .css.js suffix fail to load, some are hanged for a long time and no response, some report 500, some report 520, some report 521.
According to the compiled source code, it is found that the .css.js file is directly imported. compiled_code
According to the source code, it is a directly imported .scss file. source_code
could it be because esm.sh is missing the scss loader?
By the way, I found a puzzling phenomenon.
I use the Bundle mode import has been unable to build and import success, always time out. But importing using css mode can be successfully imported.
eg.
bundle mode imported always timeout
https://esm.sh/@douyinfe/semi-ui?bundle
css mode imported success
https://esm.sh/@douyinfe/semi-ui?css
->
https://esm.sh/v89/@douyinfe/semi-ui@2.16.1/es2022/semi-ui.css
Failing module
Error message
Everything seems to be ok, but for .scss style files it hangs up
eg.
for
https://esm.sh/v89/@douyinfe/semi-foundation@2.16.0/es2022/lib/es/popover/popover.css.js
:Additional info