Skip to content

Commit a355314

Browse files
committed
fix: Repair the packaging issues lead to cannot be highlighted
1 parent 1f05eb9 commit a355314

File tree

3 files changed

+22
-26
lines changed

3 files changed

+22
-26
lines changed

build/plugins/custom/InjectCss.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const libInjectCss = (): PluginOption => {
3030
}
3131
if (
3232
// @ts-ignore
33-
id.includes(viteConfig.build.lib.entry)
33+
id.includes("packages/index.ts")
3434
) {
3535
return {
3636
code: `${code}

package.json

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
{
22
"name": "codemirror-editor-vue3",
33
"description": "CodeMirror component for Vue3",
4-
"version": "2.2.2",
4+
"version": "2.3.0-beta1",
55
"license": "MIT",
6-
"files": [
7-
"dist/codemirror-editor-vue3.es.js",
8-
"dist/codemirror-editor-vue3.umd.js",
9-
"dist/packages/*",
10-
"dist/style.css"
11-
],
6+
"files": ["dist"],
7+
"type": "module",
128
"types": "./dist/packages/index.d.ts",
13-
"main": "./dist/codemirror-editor-vue3.umd.js",
14-
"module": "./dist/codemirror-editor-vue3.es.js",
15-
"style": "./dist/style.css",
9+
"main": "./dist/codemirror-editor-vue3.umd.cjs",
10+
"module": "./dist/codemirror-editor-vue3.js",
1611
"exports": {
1712
".": {
18-
"import": "./dist/codemirror-editor-vue3.es.js",
19-
"require": "./dist/codemirror-editor-vue3.umd.js"
20-
},
21-
"./dist/style.css": {
22-
"import": "./dist/style.css",
23-
"require": "./dist/style.css"
13+
"import": "./dist/codemirror-editor-vue3.js",
14+
"require": "./dist/codemirror-editor-vue3.umd.cjs"
2415
}
2516
},
2617
"private": false,
@@ -66,6 +57,11 @@
6657
"codemirror": "^5.64.0",
6758
"diff-match-patch": "^1.0.5"
6859
},
60+
"peerDependencies": {
61+
"vue": "3.x",
62+
"codemirror": "5.x",
63+
"diff-match-patch": "^1.0.5"
64+
},
6965
"devDependencies": {
7066
"@commitlint/cli": "^16.1.0",
7167
"@commitlint/config-conventional": "^16.0.0",
@@ -78,18 +74,25 @@
7874
"@vitejs/plugin-vue-jsx": "^3.0.0",
7975
"@vue/cli-plugin-typescript": "~4.5.15",
8076
"@vueuse/core": "^9.13.0",
77+
"chalk": "^4.1.2",
78+
"conventional-changelog-cli": "^2.0.31",
8179
"dedent": "^0.7.0",
8280
"diff-match-patch": "^1.0.5",
81+
"enquirer": "^2.3.6",
8382
"eslint": "^8.35.0",
8483
"eslint-config-airbnb-base": "^15.0.0",
8584
"eslint-config-prettier": "^8.6.0",
8685
"eslint-plugin-import": "^2.27.5",
8786
"eslint-plugin-prettier": "^4.2.1",
8887
"eslint-plugin-vue": "^9.9.0",
88+
"execa": "^4.0.2",
8989
"less": "^4.1.3",
90+
"lint-staged": "^10.2.10",
91+
"minimist": "^1.2.6",
9092
"prettier": "^2.8.4",
9193
"rollup-plugin-cpy": "^2.0.1",
9294
"rollup-plugin-vue": "^6.0.0",
95+
"semver": "^7.3.5",
9396
"typescript": "^4.9.5",
9497
"unplugin-auto-import": "^0.15.0",
9598
"vite": "^4.1.4",
@@ -102,13 +105,6 @@
102105
"vue-router": "^4.1.6",
103106
"vue-tsc": "^1.2.0",
104107
"windicss": "^3.5.6",
105-
"chalk": "^4.1.2",
106-
"conventional-changelog-cli": "^2.0.31",
107-
"enquirer": "^2.3.6",
108-
"execa": "^4.0.2",
109-
"lint-staged": "^10.2.10",
110-
"minimist": "^1.2.6",
111-
"semver": "^7.3.5",
112108
"yorkie-pnpm": "^2.0.1"
113109
}
114110
}

vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function pathResolve(dir: string) {
77
return resolve(process.cwd(), ".", dir);
88
}
99

10-
const viteCfg = defineConfig({
10+
export default defineConfig({
1111
server: {
1212
host: "::",
1313
open: true,
@@ -53,6 +53,7 @@ const viteCfg = defineConfig({
5353
"vue",
5454
"codemirror",
5555
"diff-match-patch",
56+
"DiffMatchPatch",
5657
"codemirror/addon/mode/simple.js",
5758
"codemirror/lib/codemirror.js",
5859
"codemirror/mode/css/css.js",
@@ -64,4 +65,3 @@ const viteCfg = defineConfig({
6465
},
6566
plugins,
6667
});
67-
export default viteCfg;

0 commit comments

Comments
 (0)