Skip to content

Commit

Permalink
fix: build / type declarations (#9)
Browse files Browse the repository at this point in the history

* fix type declarations

* cleanup
  • Loading branch information
salza80 authored Jul 30, 2024
1 parent 74935a0 commit 3a0a55a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./src/hooks";
import { plugin } from "./src/plugin";
export default plugin;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/types/index.d.ts",
"scripts": {
"dev": "vite",
"size": "size-limit",
Expand Down
9 changes: 6 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import typescript from 'rollup-plugin-typescript2';
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import terser from '@rollup/plugin-terser';
import del from 'rollup-plugin-delete';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

export default [
{
input: 'src/index.ts',
input: 'index.ts',
output: [
{
format: 'esm',
Expand All @@ -30,14 +30,17 @@ export default [
typescript({
tsconfig: 'tsconfig.node.json',
check: false,
useTsconfigDeclarationDir: true,
tsconfigOverride: {
compilerOptions: {
sourceMap: true,
declaration: true,
declarationMap: true,
target: "ESNext",
declarationDir: "./dist/types",
}
}
})
]
}
]
];
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useTelemetryDeck } from "./"
import { useTelemetryDeck } from "../index.ts";
const { signal, queue, setClientUser } = useTelemetryDeck();
const changeClientUserClick = () => {
Expand Down
3 changes: 0 additions & 3 deletions src/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import TelemetryDeckPlugin from './'
import TelemetryDeckPlugin from '../index.ts'

const app = createApp(App)
app.use(TelemetryDeckPlugin, {
Expand Down

0 comments on commit 3a0a55a

Please sign in to comment.