Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

babel.js 482 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  1. const babel = require('@babel/core')
  2. const reactBabelOptions = {
  3. presets: [
  4. '@babel/preset-env',
  5. '@babel/preset-react'
  6. ],
  7. plugins: [
  8. '@babel/plugin-transform-react-jsx',
  9. '@babel/plugin-proposal-object-rest-spread',
  10. '@babel/plugin-proposal-class-properties',
  11. '@babel/transform-runtime'
  12. ]
  13. }
  14. const transform = code =>
  15. babel.transform(code, reactBabelOptions).code
  16. module.exports = {
  17. transform: transform,
  18. reactBabelOptions: reactBabelOptions
  19. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...