I’m using Nuxt and I needed to compile a couple specific .ts files into modules to be run. I’ve added the following into the nuxt.config.ts
file:
nitro: {
rollupConfig: {
input: ['./server/app.ts', './server/process1.ts', './server/process2.ts'],
output: {
inlineDynamicImports: false,
dir: "lib",
format: "module",
entryFileNames: "[name].js"
}
}
}
This runs as expected and adds 3 new .js files into a folder called “lib”. The problem is that adding this code seems to have reverted/stopped/interfered with the regular build process for the rest of my nitro server (presumably nuxt’s own build config).
The regular behavior would be that the nitro output files are generated to the .output directory but this directory doesnt have the regular files that it had before adding this to my nuxt.config.ts
file.
Is there a way I can add it so that this doesn’t affect the regular build process?
Khaelem Watt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.