Skip to content

Commit 58fe2eb

Browse files
chore(vue-query-devtools): Use tanstackBuildConfig from @tanstack/config (#6638)
* Experimental vite build * Finalise changes * Move to its own file * Better wrapper input * Implement feedback * Allow customising excluded directories * Update build script * Use getViteConfig for vue-query-devtools * Fix type error in getViteConfig * Rename to viteBuildConfig * Simplify relative paths * Demo snapshot testing build output * Remove snapshot testing * Undo testing * Remove local config * Bump @tanstack/config * Undo react-query changes * Bump @tanstack/config * Bump @tanstack/config * Undo lockfile changes --------- Co-authored-by: Damian Osipiuk <[email protected]>
1 parent 02477c3 commit 58fe2eb

File tree

3 files changed

+22
-41
lines changed

3 files changed

+22
-41
lines changed

packages/vue-query-devtools/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
"url": "https://github.com/sponsors/tannerlinsley"
1616
},
1717
"type": "module",
18-
"types": "dist/index.d.ts",
19-
"module": "dist/index.js",
20-
"main": "dist/index.js",
18+
"types": "dist/esm/index.d.ts",
19+
"module": "dist/esm/index.js",
20+
"main": "dist/esm/index.js",
2121
"exports": {
2222
".": {
23-
"types": "./dist/index.d.ts",
24-
"default": "./dist/index.js"
23+
"types": "./dist/esm/index.d.ts",
24+
"default": "./dist/esm/index.js"
2525
},
2626
"./production": {
27-
"types": "./dist/production.d.ts",
28-
"default": "./dist/production.js"
27+
"types": "./dist/esm/production.d.ts",
28+
"default": "./dist/esm/production.js"
2929
},
3030
"./dist/production.js": {
31-
"types": "./dist/production.d.ts",
32-
"default": "./dist/production.js"
31+
"types": "./dist/esm/production.d.ts",
32+
"default": "./dist/esm/production.js"
3333
},
3434
"./package.json": "./package.json"
3535
},
@@ -43,7 +43,7 @@
4343
"test:eslint": "eslint --ext .ts,.tsx ./src",
4444
"test:types": "vue-tsc",
4545
"test:build": "publint --strict",
46-
"build": "vite build && vue-tsc"
46+
"build": "vite build"
4747
},
4848
"dependencies": {
4949
"@tanstack/query-devtools": "workspace:*"
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"compilerOptions": {
4-
"noEmit": false,
5-
"emitDeclarationOnly": true,
6-
"outDir": "dist"
7-
},
8-
"include": ["src/**/*.ts", "src/**/*.vue"]
3+
"include": ["src/**/*.ts", "src/**/*.vue", ".eslintrc.cjs", "vite.config.ts"]
94
}
Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1-
import { resolve } from 'node:path'
2-
import { defineConfig } from 'vite'
1+
import { defineConfig, mergeConfig } from 'vite'
32
import vue from '@vitejs/plugin-vue'
3+
import { tanstackBuildConfig } from '@tanstack/config/build'
44

5-
export default defineConfig({
5+
const config = defineConfig({
66
plugins: [vue()],
7-
build: {
8-
lib: {
9-
// Could also be a dictionary or array of multiple entry points
10-
entry: [
11-
resolve(__dirname, 'src/index.ts'),
12-
resolve(__dirname, 'src/production.ts'),
13-
],
14-
formats: ['es'],
15-
},
16-
rollupOptions: {
17-
// make sure to externalize deps that shouldn't be bundled
18-
// into your library
19-
external: ['vue'],
20-
output: {
21-
// Provide global variables to use in the UMD build
22-
// for externalized deps
23-
globals: {
24-
vue: 'Vue',
25-
},
26-
},
27-
},
28-
},
297
})
8+
9+
export default mergeConfig(
10+
config,
11+
tanstackBuildConfig({
12+
entry: ['src/index.ts', 'src/production.ts'],
13+
srcDir: 'src',
14+
}),
15+
)

0 commit comments

Comments
 (0)