fix: error when use plugin without config theme (#5747)

This commit is contained in:
ClarkXia 2022-12-26 16:49:43 +08:00 committed by GitHub
parent 716df1583b
commit a944cf7f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 1.0.1
- [fix] error occur when use plugin without config `theme`
## 1.0.0 ## 1.0.0
- [feat] support use fusion component in ice.js framework. - [feat] support use fusion component in ice.js framework.

View File

@ -1,6 +1,6 @@
{ {
"name": "@ice/plugin-fusion", "name": "@ice/plugin-fusion",
"version": "1.0.0", "version": "1.0.1",
"description": "plugin for ICE while use fusion component", "description": "plugin for ICE while use fusion component",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",

View File

@ -71,7 +71,7 @@ const plugin: Plugin<PluginOptions> = (options = {}) => ({
silent: true, silent: true,
}); });
if (iconFile) { if (iconFile) {
config.transformPlugins = [...(config.transformPlugins || []), importIcon(iconFile, theme['css-prefix'] || 'next-')]; config.transformPlugins = [...(config.transformPlugins || []), importIcon(iconFile, theme?.['css-prefix'] || 'next-')];
} }
// Modify webpack config of scss rule for fusion theme. // Modify webpack config of scss rule for fusion theme.
config.configureWebpack ??= []; config.configureWebpack ??= [];