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

Should separate JS to a JS module #9

Open
onlinebizsoft opened this issue Apr 18, 2023 · 0 comments
Open

Should separate JS to a JS module #9

onlinebizsoft opened this issue Apr 18, 2023 · 0 comments

Comments

@onlinebizsoft
Copy link

Is your feature request related to a problem? Please describe.
You are having JS generated directly on a template file here
https://github.com/monsoonconsulting/magento2-pwa/blob/master/view/frontend/templates/service-worker.js.phtml
This is not Magento/RequireJS way and it can cause a little performance issue on loading because it can't be cached, can't be delayed,....

Describe the solution you'd like
JS should be done in a separated JS file
Magento configuration can be generated and pass to the JS initial script

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

1 participant