You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are very loose, and will result in renaming require/define in any js asset with a filename that contains the words "tests", "vendor", or the ember app's configured modulePrefix.
When ember-auto-import@2 is used in a non-trivial app, it will output a large number of js assets, and by default many of these will contain "vendor" somewhere in the filename. These files will have usages of "require" and "define" rewritten by this addon, and this can cause cause runtime errors or subtly incorrect behaviors that.
To add to the complexity, there are a couple files output by ember-auto-import@2 that do need to be processed by this addon: the primary app and tests entrypoints do need to be rewritten so they can capture the renamed require/define functions the app is using.
I'm logging this issue mostly to share information. We have worked around this issue in our apps, and we are also working to drop this addon entirely in the future. We could tighten up these regexes, though it would take some experimentation to figure out exactly how to do that. If anyone else runs into something like this, I may be able to advise on a solution.
The text was updated successfully, but these errors were encountered:
The regular expressions defined in
ember-esri-loader/index.js
Lines 84 to 86 in ba86053
are very loose, and will result in renaming require/define in any js asset with a filename that contains the words "tests", "vendor", or the ember app's configured
modulePrefix
.When
ember-auto-import@2
is used in a non-trivial app, it will output a large number of js assets, and by default many of these will contain "vendor" somewhere in the filename. These files will have usages of "require" and "define" rewritten by this addon, and this can cause cause runtime errors or subtly incorrect behaviors that.To add to the complexity, there are a couple files output by ember-auto-import@2 that do need to be processed by this addon: the primary
app
andtests
entrypoints do need to be rewritten so they can capture the renamed require/define functions the app is using.I'm logging this issue mostly to share information. We have worked around this issue in our apps, and we are also working to drop this addon entirely in the future. We could tighten up these regexes, though it would take some experimentation to figure out exactly how to do that. If anyone else runs into something like this, I may be able to advise on a solution.
The text was updated successfully, but these errors were encountered: