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.
In LWR-Node, we set lwc as a peer dependency which is met by the app layer. Does the same approach need to be taken with @lwc/ssr-runtime to support SSR-compiled modules?
The text was updated successfully, but these errors were encountered:
I think we could definitely do this, but probably not until @lwc/ssr-* is ready for prime time.
In the meantime, yes, you would need to set it as a peer dependency. This is probably a good practice anyway, because transitive dependencies are not always allowed to be imported/required at the top level (I believe some versions of Yarn disallow this).
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-compiler
branchyarn
(install + build)yarn ssr:start
Expected Results
The
@lwc/ssr-runtime
is found. It replaces thelwc
imports during SSR compilation here.Actual Results
The LWR-Node runtime cannot find the
@lwc/ssr-runtime
package when bundling an SSR-compiled LWC:[error] 404: Could not find module entry with specifier "@lwc/ssr-runtime"
Browsers Affected
Node.js
Version
Node project
package.json
"peerDependencies": { "@lwc/compiler": ">= 2.x" }
"devDependencies": { "@lwc/compiler": "7.2.6" }
Possible Solution
In LWR-Node, we set
lwc
as a peer dependency which is met by the app layer. Does the same approach need to be taken with@lwc/ssr-runtime
to support SSR-compiled modules?The text was updated successfully, but these errors were encountered: