-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Replace parcel to vite #36
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
Conversation
It will stop SugarSS syntax highlight. If we can’t use
Do you want to publish it to npm? We may need it in postcss.org and Vite ecosystem will be happy.
Why do we need
No problem, but can you give a list of inlined assets (and where they was inlined) to double-check? |
533babb
to
1dedfb5
Compare
Sorry I haven't worked a lot with
No problem, I changed code (moved inline config to
For now there are two assets:
Yeah, I can publish it to npm, but I need a little time to prepare code for publishing. Should I publish it before merging this PR or I can do it in other PR? |
I mean that you renames
Nope, this asset is not popular (in many cases it will not be used). So inlining will make performance worse.
It is not really bad, but make CSS parsing slower. Right now, font is requested in separated HTTP request and we use fast font parser. If we will inline it, we must use slow CSS parser, than base64 decoder and then font parser again. If we will be able to disable it, it will be nice.
Sure, we can merge it now [when apple.png and import statement will be fixes] and move to npm later. |
So maybe disable inlining assets at all?
Oh, my bad, didn't catch this |
Yeap. We do not need it with |
1dedfb5
to
6ea4ebf
Compare
I fixed css files, disable inlining and update vite config to support intellisense When I move pug plugin to separate package I will replace it here and also update build in @ai thanks for review and explanations about parsers |
Great. Thanks for PR. Just a small fix (to not forget to include it to |
I've created a PR with SugarSS support in the Vite's repository yesterday. So, maybe we could use |
Feat #logux/logux#98
index.html
):For now vite supports only
*.html
entry points (vitejs/vite#1861), so I can't useuikit.pug
as entry. To be honest, there are hacks on how to fix this, but it seemed to me that this is a less clear solution.So I created
index.html
and moved the head part there so that only the layout remains in the pug template*.sss
extensions to*.css
Unfortunately vite is not support sugarss files for now. If I use these files in entry point it doesn't transform. I found extensions that vite supports for link tag.
Later I will create issue for adding sugarss extensions. But for now I decided that renaming files is not big problem, besides these files only contain import statements
service.js
topublic
folderBy default vite transform all files imported from scripts even those that are used in
new URL
expression, except those that stored inpublic
folder.If moving is not acceptable, I can add an exception for this file in the vite configuration, but moving all files that do not need to be transformed to a separate directory seemed more clear solution to me (absolute paths must be used to import those files)
I didn't find a template plugin for pug. Only this one, but it didn't work properly.
I have created simple plugin. To include pug template it uses
<template>
tag withdata-
attributes. This way the plugin syntax doesn't break the html semanticsUnfortunately now it does not support partial rendering on HMR. I think that full HMR support can be the next step if it is needed here
assets
folder for artifactsOne more specific thing to vite is that it inlines assets smaller than 4kb by default. I didn't change this so some assets become inline.
@ai what do you think about this option? I can disable this feature