admin管理员组文章数量:1279050
My project has a folder named kaspa
that was placed at the root directory. That folder are already been built by external parties so it must be left as is when running pnpm build
.
I have set these options on my config file
nitro: {
esbuild: {
options: {
target: 'esnext',
exclude: [
'kaspa/kaspa.js',
'kaspa/kaspa.d.ts',
'kaspa/kaspa_bg.wasm',
'kaspa/kaspa_bg.wasm.d.ts',
],
},
},
},
vite: {
optimizeDeps: {
exclude: [
'kaspa/kaspa.js',
'kaspa/kaspa.d.ts',
'kaspa/kaspa_bg.wasm',
'kaspa/kaspa_bg.wasm.d.ts',
],
},
},
as well as adding a .nuxtconfig
file with the same content:
kaspa/kaspa.js
kaspa/kaspa.d.ts
kaspa/kaspa_bg.wasm
kaspa/kaspa_bg.wasm.d.ts
But it doesn't work.
Nuxt keeps rebuilding it, and compiled it as .nuxt/dist/server/_nuxt/kaspa-CvShH_pb.js
. I don't want this because it replaces the classes to a minified object that causes this kind of error:
object constructor `et` does not match expected class `Resolver`
class Resolver
itself is part of kaspa
. What can I do to make this work?
本文标签: nuxtjsI can39t make Nuxt ignore a folder at build timeStack Overflow
版权声明:本文标题:nuxt.js - I can't make Nuxt ignore a folder at build time - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741247782a2365214.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论