Skip to content

Commit

Permalink
Ship with bigint support built-in (#2789)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi authored and lukastaegert committed Apr 5, 2019
1 parent c6bad2f commit c3d67ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Graph.ts
@@ -1,6 +1,7 @@
import * as acorn from 'acorn';
import injectDynamicImportPlugin from 'acorn-dynamic-import';
import injectImportMeta from 'acorn-import-meta';
import injectBigInt from 'acorn-bigint';
import * as ESTree from 'estree';
import GlobalScope from './ast/scopes/GlobalScope';
import { EntityPathTracker } from './ast/utils/EntityPathTracker';
Expand Down Expand Up @@ -180,6 +181,7 @@ export default class Graph {

acornPluginsToInject.push(injectDynamicImportPlugin);
acornPluginsToInject.push(injectImportMeta);
acornPluginsToInject.push(injectBigInt);

if (options.experimentalTopLevelAwait) {
(<any>this.acornOptions).allowAwaitOutsideFunction = true;
Expand Down
3 changes: 0 additions & 3 deletions test/form/samples/big-int/_config.js
@@ -1,8 +1,5 @@
const bigInt = require('acorn-bigint');

module.exports = {
description: 'supports bigint via acorn plugin',
options: {
acornInjectPlugins: [bigInt]
}
};
1 change: 1 addition & 0 deletions typings/declarations.d.ts
Expand Up @@ -18,3 +18,4 @@ declare module 'sourcemap-codec';
declare module 'require-relative';
declare module 'acorn-dynamic-import';
declare module 'acorn-import-meta';
declare module 'acorn-bigint';

0 comments on commit c3d67ca

Please sign in to comment.