Skip to content

Commit 949e99a

Browse files
committed
revert from unbuild to vite
1 parent 21704a8 commit 949e99a

File tree

13 files changed

+680
-271
lines changed

13 files changed

+680
-271
lines changed

build.config.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

demo/nuxt/yarn.lock

Lines changed: 315 additions & 4 deletions
Large diffs are not rendered by default.

demo/vue/src/main.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import { createApp } from "vue"
2-
import App from "./App.vue"
3-
import { router } from "./router"
4-
import "vue3-notion/dist/style.css"
1+
import { createApp } from "vue";
2+
import App from "./App.vue";
3+
import { router } from "./router";
4+
import "vue3-notion/dist/style.css";
55

6-
createApp(App).use(router).mount("#app")
6+
import "prismjs/themes/prism.css";
7+
import "katex/dist/katex.min.css";
8+
9+
createApp(App).use(router).mount("#app");

demo/vue/src/router/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { createRouter, createWebHistory } from "vue-router"
2-
import Home from "../view/Index.vue"
3-
import Page from "../view/Page.vue"
1+
import { createRouter, createWebHistory } from "vue-router";
2+
import Home from "../view/Index.vue";
3+
import Page from "../view/Page.vue";
44

55
const routes = [
66
{ path: "/", name: "Home", component: Home },
7-
{ path: "/page/:id", name: "Page", component: Page },
8-
]
7+
{ path: "/:id", name: "Page", component: Page },
8+
];
99

1010
export const router = createRouter({
1111
history: createWebHistory(),
1212
routes,
13-
})
13+
});

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"homepage": "https://vue3-notion.vercel.app/",
66
"repository": "github:zernonia/vue3-notion",
77
"type": "module",
8-
"main": "./dist/index.mjs",
9-
"types": "./dist/index.d.ts",
8+
"main": "./dist/vue3-notion.umd.cjs",
9+
"module": "./dist/vue3-notion.js",
1010
"exports": {
1111
".": {
12-
"import": "./dist/index.mjs",
13-
"require": "./dist/index.js"
12+
"import": "./dist/vue3-notion.js",
13+
"require": "./dist/vue3-notion.umd.cjs"
1414
},
1515
"./nuxt": {
1616
"require": "./nuxt/index.ts",
@@ -36,28 +36,28 @@
3636
"scripts": {
3737
"dev": "vite serve playground",
3838
"dev:build": "vite build playground",
39-
"build": "unbuild",
39+
"build": "vite build",
4040
"preview": "vite preview",
4141
"version": " git add -A src",
4242
"postversion": "git push && git push --tags",
4343
"deploy": "npm run build && npm version patch && npm publish"
4444
},
4545
"dependencies": {
46-
"@nuxt/kit": "^3.4.3",
47-
"@vueuse/core": "^8.7.5",
4846
"katex": "^0.15.1",
4947
"prismjs": "^1.25.0",
50-
"vue": "^3.2.26",
51-
"vue-router": "4"
48+
"vue": "^3.2.26"
5249
},
5350
"devDependencies": {
51+
"vue-router": "4",
52+
"@nuxt/kit": "^3.4.3",
53+
"@vueuse/core": "^8.7.5",
5454
"@types/katex": "^0.11.1",
5555
"@types/node": "^17.0.5",
5656
"@types/prismjs": "^1.16.6",
5757
"@vitejs/plugin-vue": "^4.2.1",
5858
"typescript": "^5.0.4",
59-
"unbuild": "^1.2.1",
60-
"vite": "^4.3.5"
59+
"vite": "^4.3.5",
60+
"vite-plugin-dts": "^2.3.0"
6161
},
6262
"peerDependencies": {
6363
"katex": "^0.15.1",

playground/router/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { createRouter, createWebHistory } from "vue-router"
2-
import Home from "../view/Index.vue"
3-
import Page from "../view/Page.vue"
1+
import { createRouter, createWebHistory } from "vue-router";
2+
import Home from "../view/Index.vue";
3+
import Page from "../view/Page.vue";
44

55
const routes = [
66
{ path: "/", name: "Home", component: Home },
7-
{ path: "/page/:id", name: "Page", component: Page },
8-
]
7+
{ path: "/:id", name: "Page", component: Page },
8+
];
99

1010
export const router = createRouter({
1111
history: createWebHistory(),
1212
routes,
13-
})
13+
});

postcss.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

rollup.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/blocks/page.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import { useNotionBlock, defineNotionProps } from "../lib/blockable";
3-
import NotionPageHeader from "../blocks/helpers/page-header.vue";
43
import NotionPageIcon from "../blocks/helpers/page-icon.vue";
54
import NotionTextRenderer from "../blocks/helpers/text-renderer.vue";
65
import { computed, StyleValue } from "vue";
@@ -21,7 +20,7 @@ const computedFont = computed(() => {
2120
} else if (font == "mono") {
2221
return { fontFamily: "iawriter-mono, Nitti, Menlo, Courier, monospace" };
2322
}
24-
}) as StyleValue;
23+
});
2524
</script>
2625

2726
<script lang="ts">

src/components/notion-renderer.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
import { defineNotionProps, useNotionBlock } from "../lib/blockable";
33
import NotionBlock from "../components/block.vue";
44
5-
import "prismjs/themes/prism.css";
6-
import "katex/dist/katex.min.css";
7-
85
const props = defineProps({ ...defineNotionProps });
96
//@ts-ignore
107
const { pass, block } = useNotionBlock(props);

0 commit comments

Comments
 (0)