Closed John-Chan closed 3 months ago
hi @John-Chan thanks for reporting.
Could you try running the React-TypeScript template to see if thee bug happens as well? I'm looking to know if the issue is template-specific.
npx extension create my-extension --template=vue-typescript
The React-TypeScript template cannot run due to icon path issues( #87), and it's uncertain whether there is an issue with UTF-8 encoding.
npx extension create my-extension-react --template=react-typescript
I suspect that the output.cssHeadDataCompression
option in webpack@5.91.0
enabled in the production
environment caused content-0.js
to contain an unrecognizable character. I attempted to disable the output.cssHeadDataCompression
option to avoid this issue. I also found a change in webpack@5.92.0
, where the latest version will no longer have unrecognizable characters.
webpack@5.92.0 https://github.com/webpack/webpack/blob/34e2561addb0f65a7a6fb0ce7ae1aea4cd1d599f/lib/css/CssLoadingRuntimeModule.js#L227
Run npm run start
webpack@5.91.0
webpack@5.92.0
@cezaraugusto,I'm not quite sure about the purpose of the output.cssHeadDataCompression
option being enabled. I think upgrading the webpack
version would be more appropriate. Could you verify that?
@OSpoon thanks for investigating! Did updating webpack solved the issue? I'm not able to reproduce
@cezaraugusto, I reproduced this issue using the code of the main branch. For this inssus, I tried two solutions:
To disable the output.cssHeadDataCompression
option.
Upgrade webpack to the latest version.
thanks @OSpoon, PR opened to bump webpack
@John-Chan could you please try again? I just released v1.8.0 which should fix it.
npx extension@latest start my-extension --template=vue-typescript
Also please note that start
will bundle your extension in production mode without live-reload support. For development you want to run the dev
command.
Let me know if that works for you so we can close this one. Thanks!
Compared to before, vue templates no longer pop up utf8 encoding errors, but the project still can't start successfully because of the icon path problem. Maybe we need to wait for the icon path issue to be resolved and try again.
@John-Chan @OSpoon happy to share that this bug is finally fixed.
# Ensure you run @latest as npx cache system can trick you are not
npx extension@latest create my-extension --template=vue-typescript
If I'm wrong, let me know!
The ICON path issue still exists, manually copying the file to the dist/chrome/icons
path works. So the utf8 encoding issue should be fixed.
hi @cezaraugusto, webpack-run-edge-extension
, webpack-run-chrome-extension
and webpack-browser-extension-manifest
were last updated 12 days ago, Do you need to release the latest version?
@OSpoon just bumped all three versions but can't repro the bug yet. do you?
@cezaraugusto, I don't see the new version of webpack-browser-extension-manifest
Oops my bad, released now
@cezaraugusto Regarding the problem of the path in the win
environment, I have verified it, and please @John-chan can try again in his free time, thank you very much ~
@cezaraugusto Regarding the problem of the path in the
win
environment, I have verified it, and please @John-Chan can try again in his free time, thank you very much ~
Great! It's works
thanks for confirming @John-Chan! feel free to report anything else you find weird.
@OSpoon thanks for digging into it! 💯
Closing as fixed 🎉
Create a project via :
and run
npm run start