I'm new in vue js. I set up new vue project using vue cli and also choose template webpack. My project has two parts : Frontend and Admin panel. Both have different templates. So, i give route meta "backend" for all backend components. I added all css by following logic in main.js
if (to.matched.some(record => record.meta.backend)) { require('../static/backend.css') next() } else { require('../static/frontend.css') next() } })
When i run "npm run dev" command , all css works perfectly, But when i run "npm run build" command, all css merged in one file. So my backend css override on frontend.
Please give me any solution for that.
Thanks