Closed PatrykKuniczak closed 2 months ago
Removing the module brings back the below error:
The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'
@PatrykKuniczak is there any work around for this?
@akshaycj I've figured it out, a minutes ago XD
I need to take a look on that, i've placed it on my TODO list, i'll fixed it ASAP :)
@PatrykKuniczak quick question, what parts of the extension are affected when module is added? just curious.
@akshaycj If my brain works well, that's probably content-ui
i really doesn't remember, i need to take a look.
Maybe that's conflict with sth else, and it distract me, and the solution could be to rollback this PR.
@akshaycj Sth like that ocurr:
I don't want to struggle with this, i'll create new package for handle all env and simplify it for users 🔥
I'm struggling a lot with this
I'm struggling a lot with this
I'm currently working on new solution, i have som bash script for automatization and now process.env have all envs including this from CLI.
But i can't use process
in browser.
I need to create additional object which takes all process
values which will work either on server(node) and on browser.
Be pacient, we'll merge it ASAP 😄
I'm struggling a lot with this
I'm currently working on new solution, i have som bash script for automatization and now process.env have all envs including this from CLI.
But i can't use
process
in browser. I need to create additional object which takes allprocess
values which will work either on server(node) and on browser.Be pacient, we'll merge it ASAP 😄
That's awesome to know, thank you very much @PatrykKuniczak
@paluchi But I'm verrryyy stuck with 1 think and we all were stuck, but i hope i'll do it in this week :) It depends if @Jonghakseo are able to fix this issue 😆
@paluchi @PatrykKuniczak
Maybe it works for us.
@Jonghakseo @PatrykKuniczak At least from my side I can say you are helping a lot of people fixing this issue. I'm trying to centralize envs in a .ts file under packages directory but It seems not to work with process.env nor import.meta.env.{YOUR_KEY}
I had to remove this line to get it working https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite/blob/main/packages/tsconfig/utils.json#L8
but even then, I get ts error saying
Property 'env' does not exist on type 'ImportMeta'.ts(2339)
Let me try to fix this.
it turned out that it refers to ImportMeta
in this file
node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.dom.d.ts
copying vite-env.d.ts
into the package that uses import.meta.env
works for me.
Thank you!
so basically,
tsconfig.json
in compilerOptions
"module": "ESNext",
vite-env.d.ts
file in the package.it turned out that it refers to
ImportMeta
in this filenode_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.dom.d.ts
copyingvite-env.d.ts
into the package that usesimport.meta.env
works for me. Thank you!so basically,
- add
tsconfig.json
incompilerOptions
"module": "ESNext",
- copy
vite-env.d.ts
file in the package.
I'll do it to work everywhere good, but after we merge #711 :) Thanks for your temporary solution
Hi @PatrykKuniczak. Is there any time estimate for the resolution of this problem?
Hi @PatrykKuniczak. Is there any time estimate for the resolution of this problem?
It depends on @Jonghakseo time, because i have been waiting for code review
Hi @PatrykKuniczak @Jonghakseo Do we have any news regarding this problem?
Hi @PatrykKuniczak @Jonghakseo Do we have any news regarding this problem?
We have no time
Priority*
Purpose of the PR*
On the #682 i changed this value, because one person from discord suggest it, but it isn't good idea, because i see a part of pages don't work properly, we need to change it immediately.
Changes*
I removed
module
fromtsconfig
This it very urgent :)