pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx
MIT License
810 stars 47 forks source link

create-react-app integration instructions are out of date #121

Open SydBal opened 4 years ago

SydBal commented 4 years ago

The new version of create-react-app no longer uses a .babelrc file in the root of the project, with the configuration instead existing in the package.json. This lead to confusion when spinning up a new project. The new version of CRA also has a more robust linting configuration, and will not compile without further modification.

I went ahead and created a working version of an ejected CRA, available here https://github.com/SydBal/cra-ejected-pug which demonstrates the modifications I needed to make in order to get the integration working. (spinning off of this stack overflow answer https://stackoverflow.com/questions/56513346/how-to-use-pug-templating-engine-with-reactjs/62051614#62051614)

The README should be updated to reflect the new setup.

gotexis commented 3 years ago

use craco

skotchpine commented 3 years ago

I just set this up with react-app-rewired and customize-cra and will have a PR shortly

skotchpine commented 3 years ago

I’ve been using react-app-rewired without issues for prod apps since the beginning of 2020. Can post configs if y’all need