diff --git a/rollup.config.js b/rollup.config.js index 68a4d365bcd..fb27c72b742 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -49,7 +49,8 @@ const moduleAliases = { resolve: ['.js', '.json', '.md'], entries: [ { find: 'help.md', replacement: path.resolve('cli/help.md') }, - { find: 'package.json', replacement: path.resolve('package.json') } + { find: 'package.json', replacement: path.resolve('package.json') }, + { find: 'acorn', replacement: path.resolve('node_modules/acorn/dist/acorn.mjs') } ] }; diff --git a/src/utils/options/normalizeInputOptions.ts b/src/utils/options/normalizeInputOptions.ts index 25526d58b2e..b94c3a71776 100644 --- a/src/utils/options/normalizeInputOptions.ts +++ b/src/utils/options/normalizeInputOptions.ts @@ -1,3 +1,4 @@ +import * as acorn from 'acorn'; import injectClassFields from 'acorn-class-fields'; import injectStaticClassFeatures from 'acorn-static-class-features'; import { diff --git a/typings/declarations.d.ts b/typings/declarations.d.ts index 22a2d3138c0..5473605cc86 100644 --- a/typings/declarations.d.ts +++ b/typings/declarations.d.ts @@ -1,5 +1,4 @@ // internal -declare module 'rollup'; declare module 'help.md' { const str: string; export default str; @@ -16,16 +15,6 @@ declare module 'acorn-class-fields' { export default plugin; } -declare module 'acorn-import-meta' { - const plugin: (BaseParser: typeof acorn.Parser) => typeof acorn.Parser; - export default plugin; -} - -declare module 'acorn-export-ns-from' { - const plugin: (BaseParser: typeof acorn.Parser) => typeof acorn.Parser; - export default plugin; -} - declare module 'fsevents' { export default {}; }