compass-web-components
v6.1.35
Published
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Downloads
26
Readme
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list
Getting Started
npm i
# start Storybook
npm run storybook
# start build
npm run build
The project was created following these guides
Template Vite-React-storybook:
- (https://github.com/DavidNic11/vite-react-to-webcomponent/tree/main)
- (https://www.bitovi.com/blog/react-everywhere-with-vite-and-react-to-webcomponent)
Libreria React-to-webcomponent:
- (https://www.bitovi.com/open-source/react-to-web-component)
publish new version
Update the Version Manually: Open package.json and update the version field Using npm CLI: npm version patch # or minor, or major
Build the Project npm run build npm login npm publish
OR run a script, depending on whether it's a bug, feature or breaking change npm run release:patch || npm run release:minor || npm run release:major