@gct-paas/word 0.1.67-beta.1 → 0.1.67-beta.2

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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.1.67-beta.1 */
1
+ /*! @gct-paas/word v0.1.67-beta.2 */
2
2
  import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toValue, unref, useCssVars, useModel, useSlots, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import FloatingVue, { PopperWrapper } from "floating-vue";
4
4
  import VueKonva from "vue-konva";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.67-beta.1",
3
+ "version": "0.1.67-beta.2",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",
@@ -23,13 +23,19 @@
23
23
  },
24
24
  "./style.css": {
25
25
  "default": "./dist/word.css"
26
+ },
27
+ "./vite": {
28
+ "types": "./vite/index.d.ts",
29
+ "import": "./vite/index.mjs",
30
+ "default": "./vite/index.mjs"
26
31
  }
27
32
  },
28
33
  "main": "./dist/index.es.js",
29
34
  "module": "./dist/index.es.js",
30
35
  "types": "./dist/index.d.ts",
31
36
  "files": [
32
- "dist"
37
+ "dist",
38
+ "vite"
33
39
  ],
34
40
  "scripts": {
35
41
  "build": "vite build --config vite.config.ts",
@@ -0,0 +1,17 @@
1
+ import type { Plugin } from 'vite';
2
+
3
+ /**
4
+ * 宿主 Vite 接入插件:避免 6.0 插件模式预构建 word / vue-konva 打出双 Vue,
5
+ * 并补齐 word 内部 CJS 依赖的 optimizeDeps。
6
+ *
7
+ * @example
8
+ * import { defineWebPluginViteConfig } from '@gct-paas/build';
9
+ * import { gctWordVitePlugin } from '@gct-paas/word/vite';
10
+ *
11
+ * export default defineWebPluginViteConfig({
12
+ * plugins: [gctWordVitePlugin()],
13
+ * });
14
+ */
15
+ export declare function gctWordVitePlugin(): Plugin;
16
+
17
+ export default gctWordVitePlugin;
package/vite/index.mjs ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 宿主 Vite 接入插件:避免 6.0 插件模式预构建 word / vue-konva 打出双 Vue,
3
+ * 并补齐 word 内部 CJS 依赖的 optimizeDeps。
4
+ *
5
+ * @example
6
+ * import { defineWebPluginViteConfig } from '@gct-paas/build';
7
+ * import { gctWordVitePlugin } from '@gct-paas/word/vite';
8
+ *
9
+ * export default defineWebPluginViteConfig({
10
+ * plugins: [gctWordVitePlugin()],
11
+ * });
12
+ */
13
+ export function gctWordVitePlugin() {
14
+ return {
15
+ name: 'gct-paas-word',
16
+ config() {
17
+ return {
18
+ resolve: {
19
+ dedupe: ['vue', '@gct-paas/api'],
20
+ },
21
+ optimizeDeps: {
22
+ exclude: ['@gct-paas/word', 'vue-konva', 'konva'],
23
+ include: [
24
+ '@gct-paas/word > crypto-js',
25
+ '@gct-paas/word > jsbarcode',
26
+ '@gct-paas/word > qrcode',
27
+ '@gct-paas/word > exifr',
28
+ ],
29
+ },
30
+ };
31
+ },
32
+ };
33
+ }
34
+
35
+ export default gctWordVitePlugin;