houwenjian 1.0.3 → 1.0.6

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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/vite.config.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houwenjian",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "main": "vite.config.js",
5
5
  "dependencies": {
6
6
  "csstype": "^3.2.3",
@@ -11,7 +11,8 @@
11
11
  "picocolors": "^1.1.1",
12
12
  "postcss": "^8.5.6",
13
13
  "source-map-js": "^1.2.1",
14
- "vue": "^3.5.26"
14
+ "vue": "^3.5.26",
15
+ "rollup-plugin-peer-deps-external": "^2.2.4"
15
16
  },
16
17
  "devDependencies": {},
17
18
  "scripts": {
package/vite.config.js CHANGED
@@ -1,15 +1,17 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue';
3
+ import peerDepsExternal from 'rollup-plugin-peer-deps-external';
3
4
 
4
5
  export default defineConfig({
5
6
  build: {
6
7
  lib: {
7
8
  entry: './src/index.js', // 入口文件
8
- name: 'RichEditor', // 全局变量名(UMD模式)
9
- fileName: (format) => `richeditor.${format}.js`,
9
+ name: 'houwenjian', // 全局变量名(UMD模式)
10
+ fileName: (format) => `houwenjian.${format}.js`,
10
11
  },
11
12
  rollupOptions: {
12
13
  external: ['vue'], // 将vue作为peerDependency
14
+ plugins: [peerDepsExternal()],
13
15
  output: {
14
16
  globals: {
15
17
  vue: 'Vue' // UMD模式下映射vue到全局变量