-
Notifications
You must be signed in to change notification settings - Fork 34
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
How to build and import TKO-beta as a bundled library. #178
Comments
Hi!
is a compatibility-oriented build, while build.reference is canonical TKO 4 beta 1.3 without further compatibilities. I'll look into it. UPD 1: yeah, builds/reference/package.json: UPD 2: calling make from project root builds bundles, builds/reference/index.ts tells about unknown version of TKO, while with importing dist/index.js as ESM, ko.applyBindings does not seem work with components in inlined DOM nodes, at which bindings were applied (for a whole document in my case, by default) Right now I could advice until somebody tells otherwise to build from |
Hi, so working with beta1.3 tag the problem seems to be in some circular deps (my guess): ECSImporting with anything like: import * as ko from "tko/builds/reference/dist/index.js"
import ko from "tko/builds/reference/dist/index.js"
import tko from "tko/builds/reference/dist/index.js" i'm getting browser.jsbut, calling import "tko/builds/reference/dist/browser.min.js"
// and then for compatibility
const ko = tko does the trick |
Hi! I think this issue can be closed due to #179 |
Hello.
I'm trying to build and import recent TKO-beta version at my TS project built from source (as of npm-hosted version is alpha7).
So, I cloned that repo and run "make" (if I understood correctly, the default is make 'all', which uses npx'ed Lerna as packager for individual of packages from the monorepo in
packages
and calls their builders) command from root of the repo, then I got "builds" folder with 2 folder inside: "knockout" and "reference". Right now i'm struggling to pinpoint/understand the functional difference between these two versions of TKO, and the purpose of the 'reference' build. I'd really appreciate some advice.Looks like the TKO library should be ready to be imported right from
dist
directory, but different file depending of used in-project modules. I understood that there are multiple build targets for different types of modules like ECM or commonJS, etc., and while using the build with ECM, i should be using theimport ko from "<arbitrary path>/libs/tko/builds/knockout/dist/index.js"
build. Please, correct me if i'm wrong. And, may it possibly be connected to #158 ?Also, if these questions are resolved, may I contribute to a readme for more clearance/updated guide on the build-to-usage pipeline. Right now I'm looking into #134 by which way the build process may be improved.
Thank you!
The text was updated successfully, but these errors were encountered: