Skip to content

Commit

Permalink
chore: fix build output
Browse files Browse the repository at this point in the history
  • Loading branch information
2wce committed Aug 15, 2024
1 parent 4c62856 commit 686d9bd
Show file tree
Hide file tree
Showing 4 changed files with 596 additions and 20 deletions.
13 changes: 0 additions & 13 deletions index.html

This file was deleted.

17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@
"name": "speaking-url-ts",
"version": "0.0.0",
"description": "An opinionated TS Lib Starter",
"main": "src/index.ts",
"author": {
"name": "Kudakwashe Mupeni",
"email": "[email protected]"
},
"license": "MIT",
"private": false,
"source": "./src/index.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"typings": "./dist/index.d.ts",
"type": "module",
"types": "src/index.d.ts",
"files": [
"dist"
],
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/types.d.ts"
}
},
"scripts": {
"release": "changeset publish",
"test": "vitest",
Expand All @@ -26,6 +38,7 @@
"@types/node": "22.2.0",
"typescript": "5.5.4",
"vite": "5.4.0",
"vite-plugin-dts": "4.0.3",
"vitest": "2.0.5"
}
}
26 changes: 26 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// <reference types="vitest" />
import { resolve } from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'

export default defineConfig({
test: {
globals: true
},
build: {
sourcemap: true,
outDir: './dist',
lib: {
entry: {
index: resolve(__dirname, 'src/index.ts')
},
formats: ['cjs', 'es']
}
},
plugins: [
dts({
entryRoot: 'src',
exclude: ['**/tests/**']
})
]
})
Loading

0 comments on commit 686d9bd

Please sign in to comment.