Closed GintV closed 9 months ago
I tried importing it in all sorts of ways and paths
can you please share what you tried?
I tried
... from "@itwin/electron-authorization/Renderer";
... from "@itwin/electron-authorization/lib/esm/renderer/Client";
... from "@itwin/electron-authorization";
This is our tsconfig.json used for Bentley fork of react-scritps
{
"extends": "./node_modules/@itwin/build-tools/tsconfig-base.json",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declaration": false,
"declarationMap": false,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"module": "esnext",
"noEmit": true,
"outDir": "./lib",
"plugins": [
{
"name": "typescript-plugin-css-modules"
}
],
"types": [
"@bentley/react-scripts",
],
},
"include": [
"./src/common/**/*.ts",
"./src/frontend/**/*.ts",
"./src/frontend/**/*.tsx"
],
"exclude": [
"./src/backend/**/*.ts"
]
}
take a look at this example: https://github.com/iTwin/itwinjs-core/pull/6058
We recently made the tsconfig updates and I thought that it might allow us to use latest electron-auth package version. I just tested and everything works now. I am closing this issue.
I am unable to import ElectronRendererAuthorization on @itwin/electron-authorization v0.16.0 . I think it is related with #195 . I tried importing it in all sorts of ways and paths, but webpack fails to find it. Trying to import it using the @itwin/electron-authorization/Renderer path, I am getting this message from webpack
It is funny that it mentions exports field since I am importing based on that export field. I am using Bentley fork of react-scripts to build frontend.