Skip to content

Commit 048c93b

Browse files
committed
fix: get metafile on windows
1 parent 2de6dd5 commit 048c93b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
} from 'esbuild'
1313
import type { Format, NormalizedOptions } from '.'
1414
import type { Logger } from './log'
15-
import type { MaybePromise } from './utils'
15+
import { slash, type MaybePromise } from './utils'
1616
import type { SourceMap } from 'rollup'
1717

1818
export type ChunkInfo = {
@@ -132,7 +132,7 @@ export class PluginContainer {
132132
.filter((file) => !file.path.endsWith('.map'))
133133
.map((file): ChunkInfo | AssetInfo => {
134134
if (isJS(file.path) || isCSS(file.path)) {
135-
const relativePath = path.relative(process.cwd(), file.path)
135+
const relativePath = slash(path.relative(process.cwd(), file.path))
136136
const meta = metafile?.outputs[relativePath]
137137
return {
138138
type: 'chunk',

0 commit comments

Comments
 (0)