Have ideas to improve npm?Join in the discussion! »

    @fullhuman/purgecss-loader

    1.0.0 • Public • Published

    purgecss-loader

    Purgecss loader for Webpack

    Installation

    npm install purgecss-loader --save-dev

    Usage

    Here is an example of how to use the loader in a Webpack configuration with Vue.js Single File Components:

    {
      module: {
        rules: [
          {
            test: /\.css$/,
            use: [
              {
                loader: 'css-loader',
                options: { importLoaders: 1 }
              },
              {
                loader: 'purgecss-loader',
                options: {
                  content: [
                    path.join(__dirname, 'src/components/**/*.vue')
                  ],
                  whitelistPatterns: [
                    /alert/
                  ]
                }
              }
            ]
          }
        ]
      }
    }

    Install

    npm i @fullhuman/purgecss-loader

    DownloadsWeekly Downloads

    895

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.88 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar
    • avatar