lxieyang / chrome-extension-boilerplate-react

A Chrome Extensions boilerplate using React 18 and Webpack 5.
MIT License
3.58k stars 1.1k forks source link

secrets.development.js cant be detected in content/index.tsx #67

Open teffy-tr opened 3 years ago

teffy-tr commented 3 years ago

I am trying to import the secrets but content wont detect the path.

Screen Shot 2021-09-10 at 4 37 25 AM

Screen Shot 2021-09-10 at 4 41 44 AM Screen Shot 2021-09-10 at 4 35 14 AM

Also, is there any example to follow on how you properly use the secrets? Thank you.

shoaib30 commented 2 years ago

did you figure it out? I think its to do with typescript types.

spielerx commented 2 years ago

just import secrets from 'secrets';

ghunkins commented 2 years ago

Yes, this is a typescript issue. Update the import to:

// @ts-ignore
import secrets from "secrets";

Would prefer another solution, but this works for now for me.