unify-external-plugin-platform 0.0.2-17 → 0.0.2-18

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": "unify-external-plugin-platform",
3
- "version": "0.0.2-17",
3
+ "version": "0.0.2-18",
4
4
  "description": "统一对外插件平台",
5
5
  "main": "./dist/external-plugin.umd.min.js",
6
6
  "author": "Young",
package/vue.config.js CHANGED
@@ -1,5 +1,23 @@
1
1
  const { defineConfig } = require('@vue/cli-service')
2
2
  const path = require('path');
3
+
4
+ const externalsConfig = {
5
+ vue: {
6
+ root: 'Vue',
7
+ commonjs: 'vue',
8
+ commonjs2: 'vue',
9
+ amd: 'vue'
10
+ },
11
+ 'element-ui': {
12
+ root: 'element-ui',
13
+ commonjs: 'element-ui',
14
+ commonjs2: 'element-ui',
15
+ amd: 'element-ui'
16
+ }
17
+ }
18
+
19
+
20
+
3
21
  module.exports = {
4
22
  configureWebpack: {
5
23
  resolve: {
@@ -11,6 +29,8 @@ module.exports = {
11
29
  },
12
30
  modules: ['node_modules']
13
31
  },
32
+ externals: process.env.NODE_ENV === 'development' ? {} : externalsConfig, // 忽略不进行处理的文件 这里 不对 Vue进行打包
33
+
14
34
  }
15
35
 
16
36
  // transpileDependencies: true