1 | #!/usr/bin/env node
|
2 |
|
3 | 'use strict';
|
4 |
|
5 | const path = require('path');
|
6 | const url = require('url');
|
7 | const v8FlagsFilter = require('@devexpress/bin-v8-flags-filter');
|
8 |
|
9 | const ESM_OPTION = '--esm';
|
10 |
|
11 | const forcedArgs = [];
|
12 |
|
13 | if (process.argv.slice(2).includes(ESM_OPTION)) {
|
14 | forcedArgs.push('--no-warnings');
|
15 | forcedArgs.push(`--experimental-loader=${url.pathToFileURL(path.join(__dirname, '../lib/compiler/esm-loader.js')).href}`);
|
16 | }
|
17 |
|
18 | v8FlagsFilter(path.join(__dirname, '../lib/cli'), {
|
19 | useShutdownMessage: true,
|
20 | forcedArgs,
|
21 | });
|