File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { readFileSync , writeFileSync } from 'node:fs'
1+ import { writeFileSync } from 'node:fs'
22import path from 'node:path'
33import MagicString from 'magic-string'
44import type { Plugin } from 'rolldown'
55import { defineConfig } from 'rolldown'
66import { ImportType , init , parse } from 'es-module-lexer'
77import licensePlugin from './rollupLicensePlugin'
8+ import pkg from './package.json' with { type : 'json' }
89
910// eslint-disable-next-line n/no-unsupported-features/node-builtins
1011const dirname = import . meta. dirname
11- const pkg = JSON . parse (
12- readFileSync ( new URL ( './package.json' , import . meta. url ) ) . toString ( ) ,
13- )
12+
1413const disableSourceMap = ! ! process . env . DEBUG_DISABLE_SOURCE_MAP
1514
1615const envConfig = defineConfig ( {
Original file line number Diff line number Diff line change 1- import { readFileSync } from 'node:fs'
21import { builtinModules } from 'node:module'
32import { defineConfig } from 'rolldown'
43import type {
@@ -13,16 +12,13 @@ import { dts } from 'rolldown-plugin-dts'
1312import { parse as parseWithBabel } from '@babel/parser'
1413import { walk } from 'estree-walker'
1514import MagicString from 'magic-string'
15+ import pkg from './package.json' with { type : 'json' }
1616
1717type Directive = ESTree . Directive
1818type ModuleExportName = ESTree . ModuleExportName
1919type Program = ESTree . Program
2020type Statement = ESTree . Statement
2121
22- const pkg = JSON . parse (
23- readFileSync ( new URL ( './package.json' , import . meta. url ) ) . toString ( ) ,
24- )
25-
2622const external = [
2723 / ^ n o d e : * / ,
2824 / ^ v i t e \/ / ,
You can’t perform that action at this time.
0 commit comments