-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Default theme CSS order inconsistent between dev and build #643
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
Comments
Could you provide a reproduction repo link for me to investigate? Thanks. |
I'm having trouble reproducing it in a minimal repro, will dig some more. |
Couldn't construct a repro. Did find that commenting out this fixes the problem:
in lib/webpack/createBaseConfig.js That produces a range of separate css chunk files, and in the chunk containing the vuepress css, the order is now correct. I can't show our codebase unfortunately, but the setup we have is vuepress locally installed within |
I don't know why you cannot construct a repro for an issue that you confirmed. So you just let me to accept a fix for an unreproducible issue? |
I don't have a fix, just a workaround which disables some intended vuepress functionality so I wouldn't recommend it (though disabling it through configureWebpack in config.js suffices for our specific use case, I'm not happy about it as it feels brittle). I cannot reproduce it outside our own codebase, which is not public. I spent several hours today trying to reproduce this in a fresh vue-cli install and couldn't. This is what I meant by not being able to reproduce it. Trust me, I'm not happy either. My last hunch was that it may have to do with the fact that the project uses vue-loader v12 and vuepress uses v15, but I had to call it and switch to other work. Might be able to do some more digging tomorrow. |
OK, thanks, not sure if this change could give you more ideas: f998802 |
Can confirm this bug. |
@taylorotwell Could you create reproduction repo for that? Thanks. |
Here is a bare-bones repo that illustrates this: vuepress-issue-643 Hopefully the difference between the sidebar links in I've added a commented-out section in the config.js that seems to resolve the issue (in this instance at least). Let me know if that helps or if you need anything else. |
Can confirm this is still an issue with my VuePress project. The CSS ordering is different between dev and production builds. |
Using |
FYI - the issue does not occur in |
Bug report
In local dev,
theme.styl
content is inlined after theme component css (f.e. fromNavbar.vue
) in the head, whereas in the built version thetheme.styl
content is placed before any component css in the0.styles.xxxxxxx.css
fileThis results in the Navbar becoming
position: relative
instead ofposition: fixed
in the built version and scrolling with the page. There are probably more issues stemming from this, but the Navbar is what tipped me off.Version
0.11.0
Steps to reproduce
yarn docs:dev
yarn docs:build
deploy the build somewhere
What is expected?
The navbar is
position: fixed
in both dev and buildWhat is actually happening?
The navbar is
position: relative
in the built versionOther relevant information
The text was updated successfully, but these errors were encountered: