Skip to content

Commit

Permalink
fix: Apply correct ordering to esbuild-register
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Apr 2, 2022
1 parent 963f5fa commit fcfbdb4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ var extensions = {
'typescript-register',
'typescript-require',
'sucrase/register/ts',
{
module: 'esbuild-register/dist/node',
register: function(mod) {
mod.register({
extensions: ['.ts'],
target: 'node' + process.version.slice(1),
});
},
},
{
module: '@babel/register',
register: function(hook) {
Expand All @@ -165,20 +156,20 @@ var extensions = {
});
},
},
],
'.tsx': [
'ts-node/register',
'typescript-node/register',
'sucrase/register',
{
module: 'esbuild-register/dist/node',
register: function(mod) {
mod.register({
extensions: ['.tsx'],
extensions: ['.ts'],
target: 'node' + process.version.slice(1),
});
},
},
],
'.tsx': [
'ts-node/register',
'typescript-node/register',
'sucrase/register',
{
module: '@babel/register',
register: function(hook) {
Expand All @@ -189,6 +180,15 @@ var extensions = {
});
},
},
{
module: 'esbuild-register/dist/node',
register: function(mod) {
mod.register({
extensions: ['.tsx'],
target: 'node' + process.version.slice(1),
});
},
},
],
'.wisp': 'wisp/engine/node',
'.xml': 'require-xml',
Expand Down

0 comments on commit fcfbdb4

Please sign in to comment.