Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/vite/rolldown.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { readFileSync, writeFileSync } from 'node:fs'
import { writeFileSync } from 'node:fs'
import path from 'node:path'
import MagicString from 'magic-string'
import type { Plugin } from 'rolldown'
import { defineConfig } from 'rolldown'
import { ImportType, init, parse } from 'es-module-lexer'
import licensePlugin from './rollupLicensePlugin'
import pkg from './package.json' with { type: 'json' }

// eslint-disable-next-line n/no-unsupported-features/node-builtins
const dirname = import.meta.dirname
const pkg = JSON.parse(
readFileSync(new URL('./package.json', import.meta.url)).toString(),
)

const disableSourceMap = !!process.env.DEBUG_DISABLE_SOURCE_MAP

const envConfig = defineConfig({
Expand Down
6 changes: 1 addition & 5 deletions packages/vite/rolldown.dts.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { readFileSync } from 'node:fs'
import { builtinModules } from 'node:module'
import { defineConfig } from 'rolldown'
import type {
Expand All @@ -13,16 +12,13 @@ import { dts } from 'rolldown-plugin-dts'
import { parse as parseWithBabel } from '@babel/parser'
import { walk } from 'estree-walker'
import MagicString from 'magic-string'
import pkg from './package.json' with { type: 'json' }

type Directive = ESTree.Directive
type ModuleExportName = ESTree.ModuleExportName
type Program = ESTree.Program
type Statement = ESTree.Statement

const pkg = JSON.parse(
readFileSync(new URL('./package.json', import.meta.url)).toString(),
)

const external = [
/^node:*/,
/^vite\//,
Expand Down
Loading