File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const parseAstGeneric = (
18
18
const result = rolldownParseAst ( filename ?? 'file.js' , code , {
19
19
sourceType : 'module' ,
20
20
lang : 'js' ,
21
+ preserveParens : false ,
21
22
...opts ,
22
23
} )
23
24
if ( result . errors . length > 0 ) {
@@ -35,6 +36,7 @@ export const parseAstGenericAsync = async (
35
36
const result = await rolldownParseAstAsync ( filename ?? 'file.js' , code , {
36
37
sourceType : 'module' ,
37
38
lang : 'js' ,
39
+ preserveParens : false ,
38
40
...opts ,
39
41
} )
40
42
if ( result . errors . length > 0 ) {
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ import path from 'node:path'
2
2
import MagicString from 'magic-string'
3
3
import type { RolldownPlugin , RollupError } from 'rolldown'
4
4
import type { RollupAstNode } from 'rollup'
5
- import { parseAstAsync } from 'rollup/parseAst'
6
5
import { stripLiteral } from 'strip-literal'
7
6
import type { Expression , ExpressionStatement } from 'estree'
8
7
import type { ResolvedConfig } from '../config'
9
8
import { evalValue , injectQuery , transformStableResult } from '../utils'
10
9
import { createBackCompatIdResolver } from '../idResolver'
11
10
import type { ResolveIdFn } from '../idResolver'
12
11
import { cleanUrl , slash } from '../../shared/utils'
12
+ import { parseAstAsync } from '../parseAst'
13
13
import type { WorkerType } from './worker'
14
14
import { WORKER_FILE_ID , workerFileToUrl } from './worker'
15
15
import { fileToUrl } from './asset'
You can’t perform that action at this time.
0 commit comments