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
In this PR, we are integrating the @lwc/ssr-compiler into LWR-Node for TD-0205202. We started passing TransformOptions.targetSSR = true into @lwc/compiler#transformSync.
Clone the lwr repo
Checkout the laura/ssr-code-type branch
yarn (install + build)
In packages/test-apps/lwr-ssr-app/lwr.config.json, set _isSsrCompilerEnabled to true (this is the "gate")
Description
Steps to Reproduce
See
lwc#2400
here.In this PR, we are integrating the
@lwc/ssr-compiler
into LWR-Node for TD-0205202. We started passingTransformOptions.targetSSR = true
into@lwc/compiler#transformSync
.lwr
repolaura/ssr-code-type
branchyarn
(install + build)_isSsrCompilerEnabled
to true (this is the "gate")yarn ssr:start
Expected Results
The LWC modules are compiled for SSR with relative template imports.
The existing compiler gives output like this, with the template being a relative import to the .html file:
Actual Results
LWR cannot parse the specifier for the
tmpl
in the SSR compiled code:[error][parse-package-name] "/Users/lpomerleau/git/lwr/packages/test-apps/lwr-ssr-app/src/modules/demo/home/home.ts" is not a valid string
The SSR compiler uses a fully qualified import URL for the template, and it's not pointing to the .html file:
Side question: Is
LightningElement
supposed to be imported from@lwc/ssr-runtime
when compiling for SSR?Browsers Affected
Node.js
Version
Node project
package.json
"peerDependencies": { "@lwc/compiler": ">= 2.x" }
"devDependencies": { "@lwc/compiler": "8.1.2" }
Possible Solution
Can the
tmpl
be a relative import to the .html file for the component?The text was updated successfully, but these errors were encountered: