Move to vite#270
Conversation
|
@sult4novars, we already have plugin for pug tranforming. I've made similar fixes, you can see settings there https://github.com/logux/logux.io/blob/main/vite.config.js |
|
@TheSeally hi! cool! I haven't known about this plugin. I will look through it and try to use it in my solution. thx) |
| @@ -0,0 +1 @@ | |||
| <pug src="./index.pug" /> No newline at end of file | |||
There was a problem hiding this comment.
As for me it is better to move some parts from index.pug to index.html (like head, body, and other important parts of HTML). I think this will improve readability
Like here
| sourceMaps: false, | ||
| mode: 'production' | ||
| let data = await vite.build({ | ||
| plugins: [vitePugPlugin()], |
There was a problem hiding this comment.
We can try to use conditional vite.config. We can pass argument to build commands (or use env variable) to specify what type of build starts and change settings like outDir in vite.config. This will remove duplication and leave the configuration in one place
@ai what do you think?
|
@ai @TheSeally thanks for review)) |
Hi! I try to resolve this issue.