mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* chore: remove .ts hooks from interpret * chore: bump gulp to 5.0.1 * chore: restructure bundle-dts task Split bundle-dts into bundle-babel-parser-dts and bundle-babel-packages-dts. Added bundle-babel-parser-dts task to the make watch * add bundle-babel-parser-dts to make build * update artifacts * fixup makefile update * update babel-parser dts banner * chore: also build babel-parser dependencies * add bundle-babel-parser-dts to ci build task * yarn dedupe
77 lines
1.7 KiB
Diff
Vendored
77 lines
1.7 KiB
Diff
Vendored
diff --git a/index.js b/index.js
|
|
index b951fd9e47ecfd4c902ace0cc301fa17cfab6289..c321f62ebf13f2ed9b7d9496ad76003805ced81e 100644
|
|
--- a/index.js
|
|
+++ b/index.js
|
|
@@ -363,69 +363,8 @@ var extensions = {
|
|
hook.install(config);
|
|
},
|
|
},
|
|
- '.ts': [
|
|
- 'ts-node/register',
|
|
- 'sucrase/register/ts',
|
|
- {
|
|
- module: '@babel/register',
|
|
- register: function (hook, config) {
|
|
- config = config || {
|
|
- rootMode: 'upward-optional',
|
|
- overrides: [
|
|
- {
|
|
- only: [endsInTs],
|
|
- presets: ['@babel/preset-env', '@babel/preset-typescript'],
|
|
- },
|
|
- ],
|
|
- };
|
|
-
|
|
- hook(
|
|
- Object.assign({}, config, {
|
|
- extensions: '.ts',
|
|
- })
|
|
- );
|
|
- },
|
|
- },
|
|
- {
|
|
- module: 'esbuild-register/dist/node',
|
|
- register: function (mod, config) {
|
|
- config = config || {
|
|
- target: 'node' + process.version.slice(1),
|
|
- hookMatcher: endsInTs,
|
|
- };
|
|
-
|
|
- mod.register(
|
|
- Object.assign({}, config, {
|
|
- extensions: ['.ts'],
|
|
- })
|
|
- );
|
|
- },
|
|
- },
|
|
- {
|
|
- module: '@swc/register',
|
|
- register: function (hook, config) {
|
|
- config = config || {
|
|
- only: [endsInTs],
|
|
- ignore: [isNodeModules],
|
|
- jsc: {
|
|
- parser: {
|
|
- syntax: 'typescript',
|
|
- },
|
|
- },
|
|
- module: {
|
|
- type: 'commonjs',
|
|
- },
|
|
- };
|
|
-
|
|
- hook(
|
|
- Object.assign({}, config, {
|
|
- extensions: '.ts',
|
|
- })
|
|
- );
|
|
- },
|
|
- },
|
|
- ],
|
|
- '.cts': ['ts-node/register'],
|
|
+ '.ts': null,
|
|
+ '.cts': null,
|
|
'.tsx': [
|
|
'ts-node/register',
|
|
'sucrase/register/tsx',
|