Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background 에서 module을 불러오지 못하는 문제 #27

Closed
findmytrueself opened this issue Sep 5, 2022 · 7 comments
Closed

Background 에서 module을 불러오지 못하는 문제 #27

findmytrueself opened this issue Sep 5, 2022 · 7 comments

Comments

@findmytrueself
Copy link

findmytrueself commented Sep 5, 2022

안녕하세요. 현재 Vue 프로젝트 파일을 React로 리팩터링 하는 중 입니다..

기존에 Vue 프로젝트에서 Background에서 사용 되던 코드를 재사용 하려고 붙여 넣었습니다.

vite로 bundling은 정상적으로 하는 것 같은데 Chrome Extension에서 자꾸 읽질 못하는 것 같습니다.

번들링된 패키지모듈을 크롬익스텐션에서 import할 방법이 있을까요?

@github-actions
Copy link

github-actions bot commented Sep 5, 2022

Thank you for your contribution. We will check and reply to you as soon as possible.

@JunyWuuuu91
Copy link
Contributor

have more informations?

@SafeAndS0und
Copy link

I don't know if that's what you asking for but if you want to import things into background/index.js try adding this to manifest.ts:

background: { service_worker: "src/pages/background/index.js", type: "module" },

@octofox1357
Copy link

any progress?

@Jonghakseo
Copy link
Owner

번들링된 패키지모듈 이라는 부분이 잘 이해가 되지 않아 상황에 대한 추가적인 정보를 요청드려도 될까요?

단순히 코드를 복사해서 붙여넣기했다면 동작하지 않을 이유가 없는데, 외부 의존성을 가져오는 부분에서 문제가 생겼다는 말씀이실까요?

@octofox1357
Copy link

background에 import한 파일 안에 다른 import 구문을 사용한 경우 t is not defined 와 같은 에러가 발생합니다. 아마 이건 크롬 익스텐션 규칙 자체의 문제 아닐까요?

@Jonghakseo
Copy link
Owner

Close the issue for no further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants