Babel
This topic has been reduced to a stub. Discussion continues in the esbuild deep dive.
Try it out
🗑 This refers to functionality removed in skuba v3.15.0.
-
babel.config.js
module.exports = { presets: [require.resolve('skuba/config/babel')], };
-
package.json
{ "skuba": { "babel": true, }, }
-
tsconfig.json
{ "compilerOptions": { "isolatedModules": true } }
(skuba v5.0.0 defaults this option to true.)
-
…and that’s it!
# uses Babel instead of tsc skuba build # uses Nodemon + babel-node instead of ts-node-dev skuba start
Current limitations
🗑 This refers to functionality removed in skuba v3.15.0.
-
Module alias support is hardcoded to
src
. -
Build command is hardcoded to input directory
src
and output directorylib
. -
The
babel-node
REPL is fairly primitive. While it can import TypeScript modules, it does not support interactive TypeScript nor modern JavaScript syntax:import { someExport } from 'src/someModule'; // Thrown: [...] Modules aren't supported in the REPL const { someExport } = require('src/someModule'); // Thrown: [...] Only `var` variables are supported in the REPL var { someExport } = require('src/someModule'); // undefined var v: undefined; // Thrown: [...] Unexpected token