Created
October 3, 2022 19:17
-
-
Save samuelastech/f3193be83b4494a0145aa996e4c37995 to your computer and use it in GitHub Desktop.
Babel setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
presets: [ | |
[ | |
'@babel/preset-env', | |
{ | |
targets: { | |
node: 'current' | |
} | |
} | |
], | |
'@babel/preset-typescript' | |
], | |
plugins: [ | |
[ | |
'module-resolver', { | |
alias: { | |
'@controllers/*': './src/controllers/*', | |
'@models/*': './src/models/*', | |
'@views/*': './src/views/*' | |
} | |
} | |
] | |
], | |
ignore: [ | |
'**/*.spec.ts' | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
scripts": { | |
"build": "babel src --extensions \".js,.ts\" --out-dir dist --copy-files --no-copy-ignored" | |
}, | |
"devDependencies": { | |
"@babel/cli": "...", | |
"@babel/core": "...", | |
"@babel/node": "...", | |
"@babel/preset-env": "...", | |
"@babel/preset-typescript": "...", | |
"babel-plugin-module-resolver": "..." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment