https://github.com/kanopi/kanopi-pack-react
Extend @kanopi/pack support for React projects
https://github.com/kanopi/kanopi-pack-react
do-not-archive internal-tool
Last synced: 3 months ago
JSON representation
Extend @kanopi/pack support for React projects
- Host: GitHub
- URL: https://github.com/kanopi/kanopi-pack-react
- Owner: kanopi
- Created: 2022-06-03T20:46:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T17:02:14.000Z (over 1 year ago)
- Last Synced: 2024-10-29T20:57:21.925Z (12 months ago)
- Topics: do-not-archive, internal-tool
- Language: JavaScript
- Homepage:
- Size: 255 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Kanopi Pack - React Support
======The Kanopi Pack React module adds support to Webpack for React development and linting. React and associated libraries (i.e. React DOM) **are NOT** included in this package. The intent is for each front-end application to select the appropriate version (React 16.13+, 17+, 18+) for their use case.
# Linting Support
Kanopi Pack offers JSX/TSX linting support out of the box, though an ESLint configuration is required. ESLint configurations are scoped within a particular directory. If you place all of your React apps in the `./assets/src/react` folder, ensure there is an `.eslintrc.js` file there, or in a directory above it.
# Additional Configuration
Following are the configuration options available in addition to the Standard Kanopi Pack configuration:
## Section: `devServer`
### Structure
"devServer": {
"react": {
"enableOverlay": false
}
}### Details
| Setting | Default | Required? | Type | Usage |
|---------|---------|:---------:|------|-------|
| `react.enableOverlay` | false | No | Boolean | Enables the React Refresh overlay, redundant with the Webpack overlay so disabled by default. |# Package Version Notes
| Package | Version Limit | Reason |
|:----|:----|:---|
| `chalk` | 4.x | Version 5.x forward are ESM based, which is not easily compatible, staying on 4.x for CommonJS support |
| `type-fest` | 3.x | Limited by version constrain of the `react-refresh-webpack-plugin`, which wants < 4.0.0 |