Support for vitejs
See original GitHub issueNot possible to use with https://github.com/vitejs/vite
I started a new project following vitejs documentation:
npm init vite@latest my-react-app -- --template react
I added all the necessary packages and configurations for @axa-fr/react-oidc-context When I try to import anything from @axa-fr/react-oidc-context vitejs dev server does not start with the following Error:
[plugin: vite:dep-scan] Failed to resolve entry for package “@axa-fr/react-oidc-context”. The package may have incorrect main/module/exports specified in its package.json
Hopefully it is an easy fix. Thank you in advance.
Versions
3.1.7
Screenshots
none
Expected
To work 😃
Actual
It does not work
Additional Details
- Installed packages:
"dependencies": {
"@axa-fr/react-oidc-context": "^3.1.7",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.7.0",
"dayjs": "^1.10.7",
"oidc-client": "^1.11.5",
"react": "^17.0.2",
"react-bootstrap": "^2.0.1",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
},
"devDependencies": {
"@vitejs/plugin-react": "^1.0.7",
"vite": "^2.6.13",
"vite-plugin-svgr": "^0.4.0"
}
- vite.config.js file content:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import svgrPlugin from 'vite-plugin-svgr'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
svgrPlugin()
]
})
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
Getting Started - Vite
Legacy browsers can be supported via the official @vitejs/plugin-legacy - see the Building for Production section for more details.
Read more >Vite | Next Generation Frontend Tooling
Out-of-the-box support for TypeScript, JSX, CSS and more.. Optimized Build. Pre-configured Rollup build with multi-page and library mode support.
Read more >Features | Vite
Vite provides first-class Vue support: Vue 3 SFC support via @vitejs/plugin-vue; Vue 3 JSX support via @vitejs/plugin-vue-jsx; Vue 2.7 ...
Read more >Building for Production - Vite
Legacy browsers can be supported via @vitejs/plugin-legacy, which will automatically generate legacy chunks and corresponding ES language feature polyfills.
Read more >Vite: Home
Out-of-the-box support for TypeScript, JSX, CSS and more. Optimized Build. Pre-configured Rollup build with multi-page and library mode support.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to get it working by adding this to the vite config
Thank you @guillaume-chervet, that’s some good news. I’m excited about the switch to AppAuthJs 👍 Any chance there will be an alpha release of the redux package as well?