@arcgis/core: webpack loader errors with React and TypeScript
See original GitHub issue@arcgis/core version @arcgis/core 4.23.7, @types/arcgis-js-api 4.23.1
Framework and build tools create-react-app 4.0.3, typescript 4.6.4
Describe the bug I am getting these webpack loader errors during dev for all the @arcgis/core widgets. My IDE and the app itself in the browser seem to run fine otherwise.
Expected behavior The app will still run, but upgrading to create-react-app v5 and the newer version of webpack it uses escalates these warnings to errors and the app will no longer run.
Reproduce the issue This project is a wrapper library around @arcgis/core to make it easier to use in React so there is not a simple way to reproduce the issue. I can provide other info if it would be helpful. Here is the tsconfig:
// tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"experimentalDecorators": true,
"importHelpers": true,
"noImplicitAny": true
},
"include": [
"src"
]
}
Browser (check https://whatismybrowser.com/) Chrome 101 on Windows 10
Operating System (check https://whatsmyos.com):
- OS: Windows 10 64bit
- Device: PC
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Things work with no webpack issues using @odoe’s repo. Must have been some issue with a combination of older dependencies is all I can think of. Thanks again.
Correct, no need for a separate install. @arcgis/core comes with the TypeScript types included.