react-turbo icon indicating copy to clipboard operation
react-turbo copied to clipboard

Usage without create-react-app?

Open joeyballentine opened this issue 3 years ago • 1 comments

Hello. This is a really interesting concept, and I want to try it out in my react project. I noticed that setup requires some CRA-related plugins. However, I set up my repo using an electron-forge boilerplate, specifically using this and this. Do I still need those CRA-related dependencies? Or are there alternate setup steps I need to take?

Thank you.

joeyballentine avatar Jun 16 '22 21:06 joeyballentine

Sorry for the late reply! I never develop an electron app, but react turbo babel plugin should work in an environment with babel compiler. In this link you provided, I think adding the plugin like this should work.

module.exports = [
  {
    test: /\.jsx?$/,
    use: {
      loader: 'babel-loader',
      options: {
        exclude: /node_modules/,
        presets: ['@babel/preset-react'],
        plugins: ["babel-plugin-react-turbo"]
      }
    }
  },
]

But please please do not use this project in production. React Turbo is buggy and not mature yet.

oney avatar Jun 19 '22 04:06 oney