Vue-cli: Prod build does not load component library css

Created on 14 May 2018  Â·  18Comments  Â·  Source: vuejs/vue-cli

Version

3.0.0-beta.10

Steps to reproduce

I have a component library that exports .vue files styled with .scss. These are consumed in my project as

import { SomeComponent } from "@comp/lib";

Vue.use("some-component", SomeComponent);

Prior to beta.10, the component css would work as expected (Tested on beta.6). Once I've upgraded to beta.10, The Prod build no longer has the component css. A thing I've noticed it the bundled output css has reduced (From a single 30kb file to multiple files NOT totalling to 30kb [~25kb]).

What is expected?

Component css should be present in Prod build

What is actually happening?

Component css is not present in Prod build

Edit:

Reproduction Link:

https://github.com/sanchitgn/comp-css


Some more details: The component library is hosted on an internal npm. It's a repo with a bunch of .vue files.
My guess is, this has to do with webpack 4 (tree-shaking?)

needs reproduction

Most helpful comment

vue_cli3.0.5,The "sideEffects": false in package.json.After build, all CSS is lost, including