@airiot/cli 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airiot/cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "AIRIOT平台前端包管理工具",
5
5
  "type": "module",
6
6
  "scripts": {},
@@ -0,0 +1,4 @@
1
+ export default {
2
+ "react-router": "https://esm.sh/react-router@6",
3
+ "react-router-dom": "https://esm.sh/react-router-dom@6"
4
+ }
@@ -45,7 +45,12 @@ const getPlugins = async (mode) => {
45
45
 
46
46
  try {
47
47
  const appPlugin = await import(new URL(`file://${paths.appVitePlugin}`));
48
- plugins.push(appPlugin.default());
48
+ const customPlugin = appPlugin.default()
49
+ if(Array.isArray(customPlugin)) {
50
+ plugins.push(...customPlugin)
51
+ } else {
52
+ plugins.push(customPlugin);
53
+ }
49
54
  } catch (error) {
50
55
  if(
51
56
  error.code != 'ERR_MODULE_NOT_FOUND'