Closed fredden closed 2 years ago
I've just realised our blocking may only work when people have JS merging disabled in the admin panel. Did you have a chance to test that?
czw., 27 paź 2022, 15:17 użytkownik Dan Wallis @.***> napisał:
Following #151 https://github.com/magesuite/magepack/pull/151, the additional RequireJS context seems unnecessary. From the limited testing that I have been able to carry out, unbundledContext.require.toUrl() behaves the same as require.toUrl() with those assets blocked / not loaded. This pull request simplifies the logic in lib/generate/collectModules.js.
You can view, comment on, or merge this pull request online at:
https://github.com/magesuite/magepack/pull/167 Commit Summary
- ca183d6 https://github.com/magesuite/magepack/pull/167/commits/ca183d698395b595fccf0636cfdf6d4737312e32 Remove unneeded additional RequireJS context
File Changes
(1 file https://github.com/magesuite/magepack/pull/167/files)
- M lib/generate/collectModules.js https://github.com/magesuite/magepack/pull/167/files#diff-ce45f2d1a3a56afc0ccebc181cc1f009afe174379eaa8e1c90e9078940f8320a (20)
Patch Links:
- https://github.com/magesuite/magepack/pull/167.patch
- https://github.com/magesuite/magepack/pull/167.diff
— Reply to this email directly, view it on GitHub https://github.com/magesuite/magepack/pull/167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGKOBJI7WPN6JQ5QKQ5ZQ3WFJ6IHANCNFSM6AAAAAARQBUYNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Good suggestion; I've not tested with that feature enabled. I'll test that next and let you know how I get on.
I can confirm that this additional RequireJS context is needed when JavaScript merging is enabled in Magento. The changes introduced in #151 are not enough to block all of Magepack when this feature is enabled.
Following #151, the additional RequireJS context seems unnecessary. From the limited testing that I have been able to carry out,
unbundledContext.require.toUrl()
behaves the same asrequire.toUrl()
with those assets blocked / not loaded. This pull request simplifies the logic inlib/generate/collectModules.js
.