New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not able to overwrite compilerOptions #14601
Comments
You can set this in your Nuxt config, within |
Thanks, I was actually able to change it using that setting, the error still remains thought. Does someone know the difference between building and running as dev for the error below? (when built, no error is popping up)
Thanks |
Likely your issue is not about your tsconfig, but maybe esbuild or rollup target. Would you provide a reproduction? 🙏 |
I also encountered this issue while testing wasm-vips with Nuxt 3, the issue seems to be caused by Vite/esbuild as mentioned here vitejs/vite#9062. A Nuxt 3 reproduction is available here. |
@Redemption198 To fix the dev server you can exclude wasm-vips from pre-bundling and set the required COOP and COEP headers, for example: // nuxt.config.ts
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
serverMiddleware: ['~/middleware/coop-coep-headers.ts'],
vite: {
optimizeDeps: {
exclude: ['wasm-vips']
}
}
}) // middleware/coop-coep-headers.ts
export default function (req: any, res: any, next: any) {
res?.setHeader('Cross-Origin-Embedder-Policy', 'require-corp')
res?.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
next()
} The production build is (unfortunately) currently broken, as you noticed. This is due to issue vitejs/vite#7015, which causes an infinite loop when it tries to transform/bundle |
Thanks, I'll try that again in the future 👍 |
Closing this to track the feature request in #14893. The remaining issue here appears to be an upstream vite bug and is not the one described in the issue. |
having a similar issue with Nuxt 3 using nitro preset: 'vercel-edge' the target defaults to es2019 which causes build errors leaving you unable to deploy to Vercel if any package you are using depends on es2020 such as: ERROR: Big integer literals are not available in the configured target environment ("es2019") I've tried many different methods to try and override this and cannot, so essentially its bricked. |
Environment
mac os
Reproduction
adding the following values into tsconfig.json
Does not override the .nuxt/tsconfig.json file and keeps target as ESNext
Describe the bug
I need to overwrite the compilerOptions because during the "nuxi run dev" I am unable to load a package that requires a different target. When using the following code for the main tsconfig.json file at the root of the project, it does not overwrite the changes and resulting target is always as its set initially by nuxi.
There needs to be a way to overwrite this. If I build the project, the imported module does not give errors. During the development, I am getting compilation errors for
Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
which should be corrected by changing the target during the compilation.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: