mirror of https://github.com/alibaba/ice.git
* feat: init plugin * feat: add plugin to example * fix: lock * docs: README * docs: css-assets-local * fix: typo |
||
|---|---|---|
| .. | ||
| src | ||
| CHANGELOG.md | ||
| README.md | ||
| package.json | ||
| tsconfig.json | ||
README.md
@ice/plugin-css-assets-local
A plugin for localize css assets resource.
Install
npm i -D @ice/plugin-css-assets-local
Usage
Add plugin to your ice.config.mts:
// 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 the assets resource will be downloaded to the 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