ice/packages/plugin-css-assets-local
ClarkXia fbeaf932cb
chore: update versions (#6509)
2023-09-14 10:58:37 +08:00
..
src fix: import path of types and runtime (#5981) 2023-02-28 15:08:10 +08:00
CHANGELOG.md chore: update versions (#6509) 2023-09-14 10:58:37 +08:00
README.md chore: optimize (#676) 2022-11-15 10:33:11 +08:00
package.json chore: update versions (#6509) 2023-09-14 10:58:37 +08:00
tsconfig.json feat: plugin-css-assets-local (#520) 2022-11-15 10:31:09 +08:00

README.md

@ice/plugin-css-assets-local

An ice.js plugin for localize css assets resource.

Install

npm i -D @ice/plugin-css-assets-local

Usage

Add plugin to your ice.config.mts:

import { defineConfig } from '@ice/app';
import cssAssetsLocal from '@ice/plugin-css-assets-local';

export default defineConfig(() => ({
  plugins: [
    cssAssetsLocal(),
  ],
}));

After running npm run build, you can see asset resources will be downloaded to your local disk.

Options

outputPath

The assets resource output path.

  • Type: string
  • Default: "assets"

relativeCssPath

The asset paths relative to the css file path.

  • Type: string
  • Default: "../"

enableInDev

Whether enable the plugin in dev or not.

  • Type: boolean
  • Default: false