Skip to content

Commit 637f5af

Browse files
committed
fix: the import module problem #1
1 parent a4198be commit 637f5af

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "vue-highlight-code",
33
"private": false,
4-
"version": "0.1.6",
4+
"version": "0.1.8",
55
"license": "MIT",
6-
"main": "./dist/vue3-highlight.umd.js",
7-
"module": "./dist/vue3-highlight.es.js",
6+
"main": "./dist/vue-highlight-code.umd.js",
7+
"module": "./dist/vue-highlight-code.es.js",
88
"files": [
99
"dist"
1010
],
1111
"exports": {
1212
".": {
13-
"import": "./dist/vue3-highlight.es.js",
14-
"require": "./dist/vue3-highlight.umd.js"
13+
"import": "./dist/vue-highlight-code.es.js",
14+
"require": "./dist/vue-highlight-code.umd.js"
1515
},
1616
"./dist/style.css": "./dist/style.css"
1717
},
@@ -28,7 +28,8 @@
2828
"@vitejs/plugin-vue": "^2.3.3",
2929
"sass": "^1.26.5",
3030
"sass-loader": "^8.0.2",
31-
"vite": "^2.9.9"
31+
"vite": "^2.9.9",
32+
"vue-highlight-code": "^0.1.7-1"
3233
},
3334
"repository": {
3435
"type": "git",

src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// This starter template is using Vue 3 <script setup> SFCs
33
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
44
// import HelloWorld from './components/HelloWorld.vue'
5-
import HighCode from './components/HighCode.vue'
5+
// import HighCode from './components/HighCode.vue'
6+
import { HighCode } from 'vue-highlight-code'
7+
import 'vue-highlight-code/dist/style.css'
68
// import textloader from './textLoader.js'
79
// import 'vue-highlight-code/dist/style.css'
810
const value = `import { HighCode } from 'vue-highlight-code';
@@ -25,7 +27,6 @@ const height = '200px'
2527
<template>
2628
<div class="wrapper">
2729
<HighCode
28-
:codeLines="true"
2930
class="code"
3031
:codeValue="value"
3132
:theme="dark"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,10 @@ vite@^2.9.9:
598598
optionalDependencies:
599599
fsevents "~2.3.2"
600600

601-
vue-highlight-code@^0.1.1:
602-
version "0.1.1"
603-
resolved "https://registry.npmjs.org/vue-highlight-code/-/vue-highlight-code-0.1.1.tgz#4b018fcb5a14add0d36a3809947fc22a4a9e1f64"
604-
integrity sha512-ODV4WkrjQCdA14DyoapcTO71lvvOykG9IPAHEZPYdtpNdfyoGC9+lK+bnn2bjYHKrY6ObIM6/hKKtvai/JMEAA==
601+
vue-highlight-code@^0.1.7-1:
602+
version "0.1.7-1"
603+
resolved "https://registry.npmjs.org/vue-highlight-code/-/vue-highlight-code-0.1.7-1.tgz#8a4e7a754406f6d7cf99fd0bb00030c934a4ee6b"
604+
integrity sha512-UDl6H/GwJvaNfoos+zZtcG5n51Xmc9RnIGcvTJA1rYo0upn5jN5yc7P3Wd9Fs8eefbqKTuFu+7u1yd4ztZmhdg==
605605
dependencies:
606606
highlight.js "^11.5.1"
607607
vue "^3.2.25"

0 commit comments

Comments
 (0)