Stylebot: Require.js conflict [Bug]

Created on 3 Aug 2020  ·  4Comments  ·  Source: ankit/stylebot

Our software uses require.js, and it appears yours does as well. Since the update, we have seen an unexpected error in the console which is due to multiple instances of require.js trying to run our code.

Sadly, I can't help you repro the problem or give too many proprietary details about our code. Basically, we use a data-main attribute for our require.js script tag that runs a file to modify the require-base stuff. See here for more about that: https://requirejs.org/docs/api.html#data-main
Now that's happening twice and the second time incorrectly since it's running it as a relative path, tacking that main js file to the end of the url.

So perhaps the solution is for us to change our software to have more specificity about which require.js to use. But if you could contain the scope of your require.js a bit, as it was before (or is the addition of requirejs new?) that'd be ideal. I don't think we'll change soon, so I might just have to find another CSS extension if you can't change it.

To repro, create a little local site using the data-main attribute and see if it conflicts.

bug resolved

Most helpful comment

I'm so glad it's an evident issue with a potential fix on the way. Thanks for your responsiveness. The recent changes to the UI look really good, btw.

I'll look forward to testing out the next release when you advise.

All 4 comments

@iamsolarplexus thanks for reporting. I was redundantly injecting the requirejs script without the stylebot editor being activated. I am hoping this will resolve the issue. I will let you know when the release is published on the chrome webstore so you can help me test this out.

I'm so glad it's an evident issue with a potential fix on the way. Thanks for your responsiveness. The recent changes to the UI look really good, btw.

I'll look forward to testing out the next release when you advise.

@iamsolarplexus this should now be resolved in the latest update. Feel free to reopen this issue, if it isn't

Confirmed. Thanks for fixing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dcormier picture dcormier  ·  17Comments

laurentvaills picture laurentvaills  ·  29Comments

zenkarsha picture zenkarsha  ·  5Comments

ifmihai picture ifmihai  ·  4Comments

qJake picture qJake  ·  10Comments