Gathering detailed insights and metrics for @alifd/next-theme-webpack-plugin
Gathering detailed insights and metrics for @alifd/next-theme-webpack-plugin
Gathering detailed insights and metrics for @alifd/next-theme-webpack-plugin
Gathering detailed insights and metrics for @alifd/next-theme-webpack-plugin
A webpack plugin for adding normalize css and icon css of theme package.
npm install @alifd/next-theme-webpack-plugin
Typescript
Module System
Node Version
NPM Version
36.1
Supply Chain
49.8
Quality
77.4
Maintenance
50
Vulnerability
96.1
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7 Commits
2 Forks
2 Watchers
2 Branches
9 Contributors
Updated on Jul 24, 2024
Latest Version
1.1.0
Package Id
@alifd/next-theme-webpack-plugin@1.1.0
Unpacked Size
10.58 kB
Size
3.62 kB
File Count
4
NPM Version
8.11.0
Node Version
16.16.0
Published on
Jul 24, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A webpack plugin for adding normalize css and icon css of theme package.
npm install babel-plugin-import --save-dev
npm install @alifd/next-theme-loader --save-dev
npm install @alifd/next-theme-webpack-plugin --save-dev
1const path = require('path'); 2const webpack = require('webpack'); 3const ExtractTextPlugin = require('extract-text-webpack-plugin'); 4const ThemePlugin = require('@alifd/next-theme-webpack-plugin'); 5 6module.exports = { 7 entry: { 8 index: './src/index.jsx' 9 }, 10 output: { 11 path: path.join(__dirname, 'build'), 12 filename: '[name].js' 13 }, 14 resolve: { 15 extensions: ['.js', '.jsx'] 16 }, 17 devtool: 'inline-source-map', 18 module: { 19 rules: [{ 20 test: /\.jsx?$/, 21 use: { 22 loader: 'babel-loader', 23 options: { 24 presets: [ 25 'env', 26 'react', 27 'stage-0' 28 ], 29 plugins: [ 30 'add-module-exports', 31 'transform-decorators-legacy', 32 ['babel-plugin-import', { style: true }] 33 ] 34 } 35 }, 36 exclude: /node_modules/ 37 }, { 38 test: /\.css$/, 39 use: ExtractTextPlugin.extract({ 40 use: 'css-loader' 41 }) 42 }, { 43 test: /\.scss$/, 44 use: ExtractTextPlugin.extract({ 45 use: [ 46 'css-loader', 47 'fast-sass-loader', 48 { 49 loader: '@alifd/next-theme-loader', 50 options: { 51 theme: '@alifd/theme-package' 52 } 53 } 54 ] 55 }) 56 }] 57 }, 58 plugins: [ 59 new ThemePlugin({ theme: '@alifd/theme-package' }), 60 new ExtractTextPlugin('[name].css') 61 ] 62};
webpack.config.js
1const path = require('path'); 2const webpack = require('webpack'); 3const ExtractTextPlugin = require('extract-text-webpack-plugin'); 4const ThemePlugin = require('@alifd/next-theme-webpack-plugin'); 5 6module.exports = { 7 entry: { 8 index: './src/index.jsx' 9 }, 10 output: { 11 path: path.join(__dirname, 'build'), 12 filename: '[name].js' 13 }, 14 resolve: { 15 extensions: ['', '.js', '.jsx'] 16 }, 17 devtool: 'inline-source-map', 18 module: { 19 loaders: [{ 20 test: /\.jsx?$/, 21 loader: 'babel', 22 query: { 23 presets: [ 24 'es2015', 25 'react', 26 'stage-0' 27 ], 28 plugins: [ 29 'add-module-exports', 30 'transform-decorators-legacy', 31 ['babel-plugin-import', { style: true }] 32 ] 33 }, 34 exclude: /node_modules/ 35 }, { 36 test: /\.css$/, 37 loaders: ExtractTextPlugin.extract('css') 38 }, { 39 test: /\.scss$/, 40 loader: ExtractTextPlugin.extract('css!fast-sass!@alifd/next-theme-loader?theme=@alifd/theme-package') 41 }] 42 }, 43 plugins: [ 44 new ThemePlugin({ theme: '@alifd/theme-package' }), 45 new ExtractTextPlugin('[name].css') 46 ] 47};
prependNormalizeCSS
(Boolean): whether prepend next build-in normalize css to bundle css, default value is true
theme
(String): theme packageresolve
(String/Array): the path(node_modules parent folder) to find the theme packagelibraryName
(String): the basic component library name, default value is @alifd/next
modifyVars
(String/Object): inject some variables to build normalize scss and icon scss, such as: $css-prefix
or $font-custom-path
, value may be the following two types
{ '$css-prefix': '"my-"' }
path.join(__dirname, 'variable.scss')
, it should be an absolute pathNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More