ice/packages/plugin-css-assets-local
ClarkXia 56fb406e8a
fix: import path of types and runtime (#5981)
* fix: import path of types and runtime

* chore: package.json

* chore: add changelog

* fix: typings

* fix: type declare
2023-02-28 15:08:10 +08:00
..
src fix: import path of types and runtime (#5981) 2023-02-28 15:08:10 +08:00
CHANGELOG.md feat: plugin-css-assets-local (#520) 2022-11-15 10:31:09 +08:00
README.md chore: optimize (#676) 2022-11-15 10:33:11 +08:00
package.json feat: use changeset to publish and version (#5864) 2023-02-13 14:48:34 +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