Open airtonix opened 2 years ago
not sure what the intention of seting configFile
is, I can only assume that you thought setting this would be equivilant to vite --config=./path-to-config-file.ts
I'll take a look at this. It was meant to merge the config file. If thats not working then. we will manually read the file and merge it ourselves.
@Jordan-Hall it's no problem with the config merge. I tried right now, it's again the problem with transitive deps. The open PR should fix this as well :-)
@airtonix could you try the latest version? Remove the "tsconfigPaths" from your config please
I'll try it out now
nope, still doesn't respect my vite.config.ts ...
i have in there something like:
build: {
emptyOutDir: false,
outDir: 'dist/graphiql-extension'
}
and it refuses to write the output there instead it writes it to ../../dist/apps/graphiql-webview/
and it refuses to write the output there instead it writes it to ../../dist/apps/graphiql-webview/
Thats working as expected. NX has a strict folder structure we are adhering too.
Yes that’s the reason. Nx defines the output structure and it’s needed for various mechanisms to work like the cache
oh well that doesn't work for vscode extensions sorry. guess I'll have to fork your project
Maybe a plain Vite project is better than? If that don’t fit with the structure of Nx, maybe Nx isn’t the best tool for the job
Agree, if you change the output, then you will loose everything but schematic for NX. You are able to change the folder structure but for NX itself... what plugin are you using and why do you need to change it.
Reopening the ticket as more talk internally about this and see what if anything would break from NX side. Already been talks about less reliant on NX while keeping benefits such as schematics and nx cloud.
@airtonix
In the meantime you can change it via the project.json by changing the output path, before we see if it would break anything moving to vite.config
@airtonix I added the possibility to set the outputDir through the project.json. It's not the vite config but through this it's more the nx dir to set something global like this. Would that work for you?
Describe the bug my apps vite.config.ts never gets used.
To Reproduce Steps to reproduce the behavior:
@nxext/vite/src/executors/build/executor.ts
@ line 49 :devkit_1.logger.info(buildConfig)
Expected behavior that things should work.
Additional context ???