Skip to content
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

Move to vite #270

Merged
merged 10 commits into from
Feb 10, 2022
Merged

Move to vite #270

merged 10 commits into from
Feb 10, 2022

Conversation

sult4novars
Copy link
Contributor

Hi! I try to resolve this issue.

@sult4novars sult4novars mentioned this pull request Feb 9, 2022
@TheSeally
Copy link

@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

@sult4novars
Copy link
Contributor Author

@TheSeally hi! cool! I haven't known about this plugin. I will look through it and try to use it in my solution. thx)

package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
vite.config.js Outdated Show resolved Hide resolved
src/index.html Outdated
@@ -0,0 +1 @@
<pug src="./index.pug" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

scripts/build-home.js Outdated Show resolved Hide resolved
design/pnpm-lock.yaml Outdated Show resolved Hide resolved
scripts/build-api.js Outdated Show resolved Hide resolved
src/api.html Outdated Show resolved Hide resolved
vite.config.js Outdated Show resolved Hide resolved
sourceMaps: false,
mode: 'production'
let data = await vite.build({
plugins: [vitePugPlugin()],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ai merged commit 73ae9d0 into postcss:main Feb 10, 2022
@sult4novars sult4novars deleted the move-to-vite branch February 11, 2022 14:25
@sult4novars
Copy link
Contributor Author

@ai @TheSeally thanks for review))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants