Skip to content

Commit

Permalink
build: web-component config (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed Oct 16, 2023
1 parent a457f1d commit fe8a3c2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
5 changes: 5 additions & 0 deletions packages/components/icon/src/icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ const style = {
color: props.color,
}
</script>

<style lang="scss">
@import '../../../theme/src/base';
@import '../../../theme/src/icon';
</style>
1 change: 1 addition & 0 deletions packages/components/tooltip/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineCustomElement } from 'vue'
import { withInstall } from '@puik/utils'

import Tooltip from './src/tooltip.vue'
Expand Down
5 changes: 5 additions & 0 deletions packages/components/tooltip/src/tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ onMounted(() => {
}
})
</script>

<style lang="scss">
@use '../../../theme/src/base';
@use '../../../theme/src/tooltip.scss';
</style>
4 changes: 4 additions & 0 deletions playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export default defineConfig({
find: /^@puik\/(.*)$/,
replacement: `${path.resolve('../packages')}/$1`,
},
{
find: /^~(.*)$/,
replacement: '$1',
},
],
},
})

0 comments on commit fe8a3c2

Please sign in to comment.