@aofl/webcomponent-css-loader
Prunes webcomponent css
Last updated 3 months ago by ariankhosravi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @aofl/webcomponent-css-loader 
SYNC missed versions from official npm registry.

@aofl/webcomponent-css-loader

The @aofl/webcomponent-css-loader is a webpack loader that inlines imported css in your component's bundle and prunes unused css.

Getting started

Run npm i -D @aofl/webcomponent-css-loader

Then add the loader to your webpack config:

module: {
  rules: [
    {
      test: /\.css$/,
      use: [
        {
          loader: '@aofl/webcomponent-css-loader',
          options: {
            cache: true
          }
        }
      ]
    }
  ]
}

In addition to adding the loader to webpack config you must also place a comment block in css files that you want to be picked up by the loader. This allows us to set the pruning behavior per component/css file.

For more information visit Purgecss docs.

/**!
 * @aoflComponent
 * @whitelist ['modal']
 * @whitelistPatterns ['btn']
 * @whitelistPatternsChildren ['alert']
 * @keyFrames true
 * @fontFace true
 */
@import "~Root/node_modules/bootstrap/dist/css/bootstrap.css";

:host {
  display: inline-block;
}

Current Tags

  • 3.5.0-beta.22                                ...           beta (3 months ago)
  • 3.5.0                                ...           latest (3 months ago)
  • 2.1.0-alpha.12.3                                ...           next (9 months ago)
  • 3.0.0-alpha.12                                ...           next-alpha (7 months ago)

54 Versions

  • 3.5.0                                ...           3 months ago
  • 3.5.0-beta.22                                ...           3 months ago
  • 3.5.0-beta.21                                ...           3 months ago
  • 3.5.0-beta.20                                ...           3 months ago
  • 3.5.0-beta.19                                ...           3 months ago
  • 3.5.0-beta.18                                ...           3 months ago
  • 3.5.0-beta.17                                ...           3 months ago
  • 3.5.0-beta.16                                ...           3 months ago
  • 3.5.0-beta.15                                ...           3 months ago
  • 3.5.0-beta.14                                ...           3 months ago
  • 3.5.0-beta.13                                ...           3 months ago
  • 3.5.0-beta.12                                ...           3 months ago
  • 3.5.0-beta.11                                ...           3 months ago
  • 3.5.0-beta.10                                ...           3 months ago
  • 3.5.0-beta.9                                ...           3 months ago
  • 3.5.0-beta.8                                ...           3 months ago
  • 3.5.0-beta.7                                ...           3 months ago
  • 3.5.0-beta.6                                ...           3 months ago
  • 3.5.0-beta.5                                ...           3 months ago
  • 3.5.0-beta.4                                ...           3 months ago
  • 3.5.0-beta.3                                ...           3 months ago
  • 3.5.0-beta.2                                ...           3 months ago
  • 3.5.0-beta.1                                ...           3 months ago
  • 3.5.0-beta.0                                ...           3 months ago
  • 3.2.1                                ...           6 months ago
  • 3.2.0                                ...           6 months ago
  • 3.1.0                                ...           6 months ago
  • 3.0.0                                ...           7 months ago
  • 3.0.0-alpha.12                                ...           7 months ago
  • 3.0.0-beta.32                                ...           8 months ago
  • 3.0.0-alpha.11                                ...           8 months ago
  • 3.0.0-alpha.5                                ...           9 months ago
  • 3.0.0-alpha.0                                ...           9 months ago
  • 3.0.0-0                                ...           9 months ago
  • 2.1.0-alpha.12.3                                ...           9 months ago
  • 2.1.0-alpha.12.2                                ...           9 months ago
  • 2.1.0-alpha.2                                ...           a year ago
  • 2.1.0-alpha.1                                ...           a year ago
  • 2.1.0-alpha.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 2.0.0-alpha.5                                ...           a year ago
  • 2.0.0-alpha.4                                ...           a year ago
  • 2.0.0-alpha.3                                ...           a year ago
  • 1.4.2                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.3                                ...           2 years ago
  • 1.2.1-pre.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.1.0-pre.1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 54
Last Month 166
Dependencies (9)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |