Gathering detailed insights and metrics for rollup-plugin-postcss-webpack-alias-less-loader
Gathering detailed insights and metrics for rollup-plugin-postcss-webpack-alias-less-loader
Gathering detailed insights and metrics for rollup-plugin-postcss-webpack-alias-less-loader
Gathering detailed insights and metrics for rollup-plugin-postcss-webpack-alias-less-loader
A custom less loader for rollup-plugin-postcss that supports webpack style aliases.
npm install rollup-plugin-postcss-webpack-alias-less-loader
Typescript
Module System
Node Version
NPM Version
64.6
Supply Chain
90.7
Quality
74.4
Maintenance
100
Vulnerability
100
License
JavaScript (85.3%)
Shell (8.26%)
CSS (6.44%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
2 Stars
5 Commits
1 Forks
2 Watchers
2 Branches
1 Contributors
Updated on Jun 26, 2023
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
rollup-plugin-postcss-webpack-alias-less-loader@1.0.0
Unpacked Size
19.86 kB
Size
7.09 kB
File Count
7
NPM Version
6.4.1
Node Version
10.15.3
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
This is a custom loader for Rollup Plugin Postcss that allows users to define webpack style aliases and have them resolve.
ex:
1@import "~bootstrap/less/common.less"; 2@import "~myAlias";
see: rollupPostcssLessLoader for full docs
~
will get resolved to node_modules
by default but is overridable.
usage below is a complete example that is used along side webpack to generate cjs and es modules:
1const alias = require('rollup-plugin-alias'); 2// Cant use rollup-plugin-typescript until the following issue is resolved, rollup-plugin-typescript2 is slow, but works :( 3// https://github.com/rollup/rollup-plugin-typescript/issues/109 4// const typescript = require('rollup-plugin-typescript'); 5const typescript = require('rollup-plugin-typescript2'); 6const postcss = require('rollup-plugin-postcss'); 7const path = require('path'); 8const { minify } = require('html-minifier'); 9const external = require('@yelo/rollup-node-external'); 10const rollupPostcssLessLoader = require('rollup-plugin-postcss-webpack-alias-less-loader') 11 12// Slurp in the webpack config so we don't have to duplicate aliases. 13const webpackConfig = require('./webpack.config'); 14 15const aliases = webpackConfig.resolve.alias; 16 17const NODE_MODULE_PATH = path.resolve('../../../../node_modules'); 18 19const CONFIG = { 20 external: external({ 21 modulesDir: NODE_MODULE_PATH, 22 }), 23 input: [webpackConfig.entry.lib], 24 output: { name: 'core', file: 'lib/lib.es.js', format: 'es', sourcemap: true }, 25 treeshake: true, 26 plugins: [ 27 { 28 // LOGGING PLUGIN 29 transform(code, id) { 30 console.log(`Processing: '${id}'`); 31 }, 32 }, 33 alias({ 34 resolve: ['.ts', '.tsx', '/index.ts', '/index.tsx'], 35 ...aliases, 36 }), 37 typescript({ 38 check: false, 39 }), 40 postcss({ 41 loaders: [rollupPostcssLessLoader({ 42 nodeModulePath: NODE_MODULE_PATH, 43 aliases: aliases 44 })], 45 }), 46 { 47 // HTML TEMPLATE PLUGIN 48 transform(code, id) { 49 if (id.endsWith('.html')) { 50 return { 51 code: `export default ${JSON.stringify(minify(code, {}))}`, 52 map: { mappings: '' }, 53 }; 54 } 55 }, 56 }, 57 ], 58}; 59 60module.exports = { 61 default: CONFIG, 62};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
73 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
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