New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load from an ES module #158
Comments
The real problem is that both Any idea how to import tko in an ES Module? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm in the process of modernizing my application moving it from AMD to ES modules. With the classic KO that was not possible and someone suggested to move to TKO, so I installed
4.0.0-alpha9.0
.I'm using the
importmap
(https://wicg.github.io/import-maps/) that is implemented in Chrome to map from"knockout"
to the"../node_modules/@tko/build.reference/dist/build.reference.es6.js"
library.Loading TKO this way:
import ko from "knockout";
now gives a runtime error:Uncaught SyntaxError: The requested module 'knockout' does not provide an export named 'default'
Loading that way:
import * as ko from "knockout";
gives a different runtime error:Tried also with the other library
build.reference.js:
with identical results. BTW, isbuild.reference.es6.js
the library that supports ES modules?The modules are compiled from Typescript, but don't think this is relevant here.
Thanks for your help. I'm quite desperate.
The text was updated successfully, but these errors were encountered: