question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

css assets got wrong order after building

See original GitHub issue

I use vite vue 3 with AntDesign, recently found that after running ‘npm run build’, the css assets is not in correct order. usually the vendor should go before common, if not, some custom css will be covered by third-party css.

image

here is the config

  ViteComponents({
      dts: true,
      resolvers: [
        AntDesignVueResolver({
          importStyle: 'less',
          resolveIcons: true
        })
      ]
    }),
`

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
CaiWenliecommented, Oct 18, 2021

image in this example, the <ul> margin attribute is obviously coverd by vendor css, though i have imported reset.css. and this only occurred in production mode. in dev mode, the reset.css works fine. the ant css is imported dynamicly by AntDesignVueResolver, so how can i put the reset.css before ant css?

0reactions
CaiWenliecommented, Jul 7, 2022

bro, have you solved this yet, i have the same problem @CaiWenlie

FYI. https://juejin.cn/post/6938351367517896712

Read more comments on GitHub >

github_iconTop Results From Across the Web

vendor css injected with wrong order after build #6375 - GitHub
But after I run build command (npm run build , npm run preview), the page background color is "pink". Because in vendor-pink.css is...
Read more >
Angular wrong css order in production build - Stack Overflow
So Angular transpile that stylesheet on priority basis and gets loaded before the said order. Let see this example:.
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >
Organizing your CSS - Learn web development | MDN
A good tip is to add a block of comments between logical sections in your stylesheet too, to help locate different sections quickly...
Read more >
Styling - Remix
Remix can prefetch CSS assets when the user is about to visit a page with <Link rel="prefetch"> . Changes to components don't break...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found