error: exports is not defined
when using ViteDevServer.ssrLoadModule
#2890
Labels
exports is not defined
when using ViteDevServer.ssrLoadModule
#2890
Describe the bug
error:
exports is not defined
when usingViteDevServer.ssrLoadModule
with the following setups:package.json
index.js
so basically, this won't work even if it really should.
Dirty Workaround?
Change the the "exports" field in
package.json
to*.mjs
and returnrequire.resolve(bootSSR)
instead of the package name itself works:package.json
index.js
Is this the intended way to resolve package name(Subpath exports) in the SSR mode..?!
System Info
vite: 2.1.5
node: v14.11.0
Used package manager: yarn
The text was updated successfully, but these errors were encountered: