From fe8a3c248c901b774da3cd240ef4b087c1f52c80 Mon Sep 17 00:00:00 2001 From: Matthias Goudjil Date: Mon, 16 Oct 2023 15:09:48 +0200 Subject: [PATCH] build: web-component config (wip) --- build/package.json | 1 + packages/components/icon/src/icon.vue | 5 +++++ packages/components/tooltip/index.ts | 1 + packages/components/tooltip/src/tooltip.vue | 5 +++++ playground/vite.config.ts | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/build/package.json b/build/package.json index de93ee44..7171c9eb 100644 --- a/build/package.json +++ b/build/package.json @@ -37,6 +37,7 @@ "@esbuild-kit/cjs-loader": "^2.4.2", "@pnpm/types": "^9.0.0", "@types/rollup-plugin-css-only": "^3.1.0", + "rollup-plugin-postcss": "^4.0.2", "unbuild": "^1.2.0", "vue": "^3.2.47" } diff --git a/packages/components/icon/src/icon.vue b/packages/components/icon/src/icon.vue index 22cd7bc0..2195d0ba 100644 --- a/packages/components/icon/src/icon.vue +++ b/packages/components/icon/src/icon.vue @@ -26,3 +26,8 @@ const style = { color: props.color, } + + diff --git a/packages/components/tooltip/index.ts b/packages/components/tooltip/index.ts index d17c0599..39c676ff 100644 --- a/packages/components/tooltip/index.ts +++ b/packages/components/tooltip/index.ts @@ -1,3 +1,4 @@ +import { defineCustomElement } from 'vue' import { withInstall } from '@puik/utils' import Tooltip from './src/tooltip.vue' diff --git a/packages/components/tooltip/src/tooltip.vue b/packages/components/tooltip/src/tooltip.vue index 3ca9b32a..56bf7e51 100644 --- a/packages/components/tooltip/src/tooltip.vue +++ b/packages/components/tooltip/src/tooltip.vue @@ -87,3 +87,8 @@ onMounted(() => { } }) + + diff --git a/playground/vite.config.ts b/playground/vite.config.ts index bf0a9c5d..a01e7f1b 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -29,6 +29,10 @@ export default defineConfig({ find: /^@puik\/(.*)$/, replacement: `${path.resolve('../packages')}/$1`, }, + { + find: /^~(.*)$/, + replacement: '$1', + }, ], }, })