8000 refactor: remove shims · vue-macros/vue-macros@66313c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66313c4

Browse files
committed
refactor: remove shims
1 parent 28870f1 commit 66313c4

File tree

5 files changed

+3
-11
lines changed

5 files changed

+3
-11
lines changed

packages/common/tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import { config } from '../../tsdown.config.js'
22

33
export default config({
44
onlyIndex: true,
5-
shims: true,
65
external: ['node:module'],
76
})

packages/config/tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { config } from '../../tsdown.config.js'
22

33
export default config({
4-
shims: true,
54
platform: 'node',
65
})

packages/devtools/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Devtools = ({ nuxtContext }: Options = {}): Plugin => {
2121
if (import.meta.DEV) {
2222
const { createServer } = await import('vite')
2323
const subServer = await createServer({
24-
root: resolve(__dirname, '../src/client'),
24+
root: resolve(import.meta.dirname, '../src/client'),
2525
server: {
2626
hmr: {
2727
port: await getPort(),
@@ -33,7 +33,7 @@ export const Devtools = ({ nuxtContext }: Options = {}): Plugin => {
3333
} else {
3434
server.middlewares.use(
3535
DEV_SERVER_PATH,
36-
sirv(resolve(__dirname, 'client'), {
36+
sirv(resolve(import.meta.dirname, 'client'), {
3737
single: true,
3838
dev: true,
3939
}),

packages/devtools/tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { config } from '../../tsdown.config.js'
22

33
export default config({
4-
shims: true,
54
ignoreDeps: ['vue'],
65
platform: 'node',
76
})

tsdown.config.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import path from 'node:path'
22
import process from 'node:process'
33
import { fileURLToPath } from 'node:url'
4-
import { defineConfig, type Options } from 'tsdown'
54
import Macros from 'unplugin-macros/rolldown'
65
import Quansync from 'unplugin-quansync/rolldown'
76
import Raw from 'unplugin-raw/rolldown'
7+
import type { Options } from 'tsdown'
88
import type { ModuleResolutionKind } from 'typescript'
99
import type { Options as UnusedOptions } from 'unplugin-unused'
1010

@@ -15,14 +15,12 @@ export function config({
1515
onlyIndex = false,
1616
platform = 'neutral',
1717
external = [],
18-
shims,
1918
ignoreDeps = { peerDependencies: ['vue'] },
2019
onSuccess,
2120
}: {
2221
onlyIndex?: boolean
2322
platform?: Options['platform']
2423
external?: string[]
25-
shims?: boolean
2624
ignoreDeps?: UnusedOptions['ignore']
2725
onSuccess?: Options['onSuccess']
2826
} = {}): Options {
@@ -45,7 +43,6 @@ export function config({
4543
define: {
4644
'import.meta.DEV': JSON.stringify(!!process.env.DEV),
4745
},
48-
shims,
4946
platform,
5047
external,
5148
unused: {
@@ -74,5 +71,3 @@ export function config({
7471
onSuccess,
7572
}
7673
}
77-
78-
export default defineConfig(config())

0 commit comments

Comments
 (0)
0