Using Babel#

You can use babel using the @bundless/plugin-babel package

Example#

js
1
// bundless.config.js
2
const { BabelPlugin } = require('@bundless/plugin-babel')
3
4
module.exports = {
5
plugins: [
6
BabelPlugin({
7
babelOptions: {
8
plugins: [require('babel-plugin-macros')],
9
},
10
}),
11
],
12
}

Notice that you will need to pass your babel options explicitly and not using .babelrc files

This API design choice has been made because usually .babelrc files contain babel presets that transpile jsx to js but this is already done in bundless, you only need to pass some specific plugins that you need

Previous
Alias
Next
React refresh
Using Babel