vue3-ssr-webpack4-hmr icon indicating copy to clipboard operation
vue3-ssr-webpack4-hmr copied to clipboard

Error in prod build

Open EvilaMany opened this issue 3 years ago • 3 comments
trafficstars

When I make production build, I always get an error:

WARNING in ./node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js 134:63-70 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted @ ./node_modules/@vue/server-renderer/index.js @ ./node_modules/vue/server-renderer/index.mjs @ ./node_modules/babel-loader/lib??ref--1!./node_modules/vue-loader/dist/templateLoader.js??ref--6!./node_modules/vue-loader/dist??ref--9-0!./src/App.vue?vue&type=template&id=ecf91598 @ ./src/App.vue?vue&type=template&id=ecf91598 @ ./src/App.vue @ ./src/entry-server.js

Any ideas how to solve this?

EvilaMany avatar Jun 29 '22 15:06 EvilaMany

You might try updating the dependencies.

CyberAP avatar Jun 29 '22 16:06 CyberAP

It didn't help (I tried in cloned non modified project)

I found that the error appears only with target: "node" in ssr webpack config

EvilaMany avatar Jun 29 '22 16:06 EvilaMany

I am sorry I don't have a capacity to help you with this issue since the reason is completely unclear to me. Please post a solution here in case you're able to resolve that yourself.

CyberAP avatar Jun 29 '22 21:06 CyberAP