-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make TypeScript optional #4
Labels
feature
New feature or request
Comments
dgp1130
added a commit
that referenced
this issue
Aug 15, 2021
Refs #38, #39, #4. This allows JS source files to be included in `prerender_component()` and related rules, both for prerendering HTML and as client side scripts. This mostly involved replacing the relevant `ts_library()` targets with `js_library()` targets to compile user code and avoid depending on it from a `ts_library()` which would require `*.d.ts` definitions that the user may not write. I included support for `*.mjs` and `*.cjs` files, although I have had trouble getting ESM to work with rules_nodejs and `*.mjs` doesn't work for a lot of complicated reasons not related to `prerender_component()`. Since we need to compile user code with either `ts_library()` or `js_library()`, it means that a given `prerender_component()` target can only compile *all* TypeScript or *all* JavaScript. This is an unfortunate requirement, but not also a reasonable ask of users, so I don't feel too bad for not supporting it.
dgp1130
added a commit
that referenced
this issue
Aug 15, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 15, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
dgp1130
added a commit
that referenced
this issue
Aug 28, 2021
Refs #38, #39, #4. This example application only uses `*.js` source files to validate the use case. It includes JavaScript prerendering code, both in a `prerender_page()` and a standalone `prerender_component()`. It also includes JS client-side scripts and validates that they get included in the final bundle *and* are properly tree shaken when not used.
Just to note, we currently require rules_prerender/repositories.bzl Line 16 in 975929f
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
@bazel/typescript
is a required peer dep because we generatets_library()
rules at runtime in user code. However, this is mostly just used as a build abstraction. We should remove unnecessary usages (such as generated entry points) and then allow users to write prerender code as simple JavaScript, opting out of the TypeScript toolchain.The text was updated successfully, but these errors were encountered: