⚡️ LightningCSS Plugin for Hexo
npm i hexo-lightningcss # npm # pnpm add hexo-lightningcss # pnpm # yarn add hexo-lightningcss # yarn/** @see {@link https://github.com/parcel-bundler/lightningcss/blob/master/node/index.d.ts} */ export type HexoLightningCSSConfig = Omit< TransformOptions, 'filename' | 'code' > & { /** * Browserslist. * @see {@link https://github.com/browserslist/browserslist/blob/main/index.d.ts} */ browserslist?: string | string[] /** * Exclude files. * @remarks If using an array, run as `new RegExp(arr[0], arr[1])` * @defaultValue `['min.css']` */ exclude?: (string | [string, string])[] }Write into _config.yml to override default value.
lightningcss: browserslist: - defaults and supports es6-module - maintained node versions exclude: - min.cssMigrating from hexo-autoprefixer
This plugin is compatible with hexo-autoprefixer configuration, no changes are needed.
But if you want, you can also change to the new format:
- autoprefixer: + lightningcss: exclude: - '*.min.css' - browsers: + browserslist: - 'last 2 versions'Browserlist may need to be put into a configuration file _config.yml, not package.json or .browserslistrc.
Licensed under the WTFPL, See the COPYING file for more details.