You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { each } from './node_modules/async-es/index.js';
What did you expect to happen?
That it would load the appropriate files (under async-es/index.js) and allow me to call each
What was the actual result?
A string of errors in the console like
GET http://localhost:8080/node_modules/async-es/unmemoize net::ERR_ABORTED 404 (Not Found)
My (possibly wrong) diagnosis.
This seems to be because index.js contains lines like
import apply from './apply'
which don't specify the .js
I'm guessing this would work in node as it might be able to make the assumption. but browser modules are very picky and want exact filenames which return correct mime-types etc.
Note --- as a workaround, the non-modules version of async, actualy works better in browser modules for some strange reason.
import async from './node_modules/async/dist/async.mjs';
The text was updated successfully, but these errors were encountered:
What version of async are you using?
3.2.6
Which environment did the issue occur in (Node/browser/Babel/Typescript version)?
Webcomponents (browser)
Is there a compiler in your toolchain? If so, is it targeting ES2017 or later and preserving
async
functions?No
What did you do? Please include a minimal reproducible case illustrating issue.
index.html contains
webcomponents.js contains
What did you expect to happen?
That it would load the appropriate files (under async-es/index.js) and allow me to call
each
What was the actual result?
A string of errors in the console like
My (possibly wrong) diagnosis.
This seems to be because index.js contains lines like
which don't specify the
.js
I'm guessing this would work in node as it might be able to make the assumption. but browser modules are very picky and want exact filenames which return correct mime-types etc.
Note --- as a workaround, the non-modules version of async, actualy works better in browser modules for some strange reason.
The text was updated successfully, but these errors were encountered: