parcel-plugin-vue icon indicating copy to clipboard operation
parcel-plugin-vue copied to clipboard

Support CSS Extraction

Open masonz opened this issue 7 years ago • 9 comments

This is a great plugin of parcel bundler, but I want extracting all component CSS into a single file for better performance. How can I do that?

masonz avatar Dec 20 '17 05:12 masonz

@masonz Thank you for your compliment, I will do it as soon as possible.

BoltDoggy avatar Dec 20 '17 06:12 BoltDoggy

@lc60005457 I'm very glad to hear that, I will continue keep to pay attention.

masonz avatar Dec 20 '17 06:12 masonz

@masonz I published the '[email protected]'.

You can make a file named 'vue.config.js', edit and save it

module.exports = {
    // If extractCSS is always true, the 'Hot module replacement' will not work.
    extractCSS: process.env.NODE_ENV === 'production'
};

For other attributes of 'vue.config.js', you can refer to https://github.com/vuejs/vueify#configuring-options

BoltDoggy avatar Dec 20 '17 08:12 BoltDoggy

@lc60005457 Thanks for quickly handle. It's work fine in Demo. But I tried to build with this feature and code splitting, it loses the lazy loading module. My project at here.

masonz avatar Dec 20 '17 11:12 masonz

I will waiting for https://github.com/parcel-bundler/parcel/issues/294

BoltDoggy avatar Dec 21 '17 11:12 BoltDoggy

Sorry, go on waiting for https://github.com/parcel-bundler/parcel/issues/481

BoltDoggy avatar Jan 03 '18 15:01 BoltDoggy

CSS Extraction failed in [email protected]

ConandSherry avatar Jan 25 '18 02:01 ConandSherry

@ConandSherry CSS Extraction fixed in #27.

masonz avatar Feb 27 '18 10:02 masonz

@BoltDoggy I think this problem has been fixed in #25. You can close the Issue at the next release.

masonz avatar Feb 27 '18 10:02 masonz