How to use the DEFAULT_EXTENSIONS function from @babel/core

Find comprehensive JavaScript @babel/core.DEFAULT_EXTENSIONS code examples handpicked from public code repositorys.

125
126
127
128
129
130
131
132
133
134
const only = program.only;
const ignore = program.ignore;
const configFile = program.configFile ? path.resolve(cwd, program.configFile) : undefined;
const rootMode = program.rootMode;
// We always transpile the default babel extensions. The option only adds more.
const transpileExtensions = babel.DEFAULT_EXTENSIONS.concat(program.extensions.map((ext) => ext.trim()));
const debug = Boolean(program.debug || program.debugBrk || program.inspect || program.inspectBrk)
const restartTimeout = Number.isFinite(program.restartTimeout) ? program.restartTimeout : 2000;

const mainModule = program.args[0];
fork icon70
star icon533
watch icon8

+ 3 other calls in file

94
95
96
97
98
99
100
101
102
103

if (program.only != null) only = arrayify(program.only, regexify);
if (program.ignore != null) ignore = arrayify(program.ignore, regexify);
debug = Boolean(program.debug || program.debugBrk || program.inspect);

let transpileExtensions = babel.DEFAULT_EXTENSIONS;

if (program.extensions) {
  transpileExtensions = transpileExtensions.concat(arrayify(program.extensions));
}
fork icon70
star icon0
watch icon2

+ 3 other calls in file