Skip to content
This repository was archived by the owner on Oct 6, 2021. It is now read-only.

Replace extract-text-webpack-plugin with mini-css-extract#265

Open
ruisalgado wants to merge 3 commits intomasterfrom
use-mini-css-extract
Open

Replace extract-text-webpack-plugin with mini-css-extract#265
ruisalgado wants to merge 3 commits intomasterfrom
use-mini-css-extract

Conversation

@ruisalgado
Copy link
Member

Closes #235

In order to review it's advisable to check the output of yarn build, since mini-css-extract is only used for production builds.

@ruisalgado ruisalgado requested a review from pascalw May 8, 2019 17:32
"sass-loader"
],
use: [
isProd ? MiniCssExtractPlugin.loader : "style-loader",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the produced CSS is not minified. According to the docs this requires a separate plugin.


<% for (var css of htmlWebpackPlugin.files.css.filter((file) => file.indexOf("shell") != -1)) { %>
<style>
<%= compilation.assets[css.substr(htmlWebpackPlugin.files.publicPath.length)].source() %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this approach the shell CSS is no longer in the head.
For Cordova apps this doesn't really matter a ton, but for PWAs it's nice to have this.

Not sure if it's worth sticking with this though, as the primary use case for Maji remains Cordova apps. WDYT?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Webpack extract-text-plugin with mini-css-extract-plugin

2 participants