extension-js / extension.js

🧩 The cross-browser extension framework.
https://extension.js.org
MIT License
3.78k stars 95 forks source link

Could not resolve path pages/<filename>.html #187

Closed aziyan99 closed 1 month ago

aziyan99 commented 1 month ago

Hey there, first thanks for created this wonderful tool! It really help me a lot developing my personal tool.

I try to create a custom page where it is will showing up as new popup window. The new pop up window is showing up with the correct local html URL, but I can't listen to onMessage and (I can listen the onmessage event) the errors in console said:

resolver-module.js:1 Could not resolve path pages/testcase-popup.html. Either add it to the "public" directory or create a page in the "pages" directory.
resolver-module.js:1 pages/testcase-popup.html
resolver-module.js:1 Could not resolve path pages/testcase-popup.html. Either add it to the "public" directory or create a page in the "pages" directory.
resolver-module.js:1 pages/testcase-popup.html

It is really weird because the testcase-popup.html is in pages directory. Here is my directories structure:

.
├── images
│   ├── test-helper_128.png
│   ├── test-helper_128.svg
│   ├── test-helper_16.png
│   ├── test-helper_16.svg
│   ├── test-helper_48.png
│   └── test-helper_48.svg
├── pages
│   ├── testcase-popup.css
│   ├── testcase-popup.html
│   └── testcase-popup.js
├── public
│   ├── hint.css
│   └── hint.min.css
├── sidebar
│   ├── index.html
│   ├── scripts.js
│   └── styles.css
├── .gitignore
├── background.js
├── manifest.json
├── package-lock.json
├── package.json
├── postcss.config.js
├── README.md
└── tailwind.config.js

I don't know whether I am doing it wrong, or this is a bug. Could you guys advise, please. Thank you :)

cezaraugusto commented 1 month ago

hi @aziyan99! I'm glad you find the project useful. This is fixed in extension@2.0.0-alpha.29. please update and let me know how it goes

aziyan99 commented 1 month ago

Hey @cezaraugusto! I've updated and there is no more console error. Thank so much.