-
Notifications
You must be signed in to change notification settings - Fork 109
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
2.x not compatible with broccoli-asset-rev prepend #411
Comments
#409 is not the same thing, but seems somewhat related (and might provide more context) |
There's also #381, which is also a different (but related) issue. |
I'll note that using broccoli-asset-rev |
Also, I'm happy to put some time in to help implement a solution. I just opened this for visibility and to start the discussion. 🙂 |
While I do agree with this, expect to see that part of the guides get rewritten to remove all mention of broccoli-asset-rev as soon as we get consensus to make embroider the default. But yes, ember-auto-import is supposed to work with ember as it is today and needs to play nice with broccoli-asset-rev. |
I think #381 is the issue we should fix, and then people should set
|
That makes sense to me, but is there any way to automatically set |
Maybe. But I want everybody to stop using broccoli-asset-rev, because it's unfixably unsound. So making config automatically flow from broccoli-asset-rev to ember-auto-import creates a refactor hazard later. |
Agreed. I don't love the idea I proposed, but it's going to take a while to get everyone off of broccoli-asset-rev. As long as there is a workable alternative and good guidance on how to migrate, I'm on board with not supporting broccoli-asset-rev. |
since we're talking about fingerprinting / prepend here with broc asset rev, just throwing out this old unresolved issue in case it's relevant for this discussion in any way: ember-cli/ember-cli#7157 |
Couldn't And, therefore, the implementation could be changed to pass this As a longtime Ember dev POV, the only reason we're using It may depend on how We're trying to get embroider going, but it appears like it'll be non-trivial, breaking churn, alongside the same churn for Octaneifying our legacy apps for Ember 4.0, so I'm trying to get a feel for how we're going to schedule these 2 large pieces of work. |
@timiyay I think it's important to distinguish different kinds of upgrade costs. If embroider or ember-auto-import 2.0 required you to audit your whole app and touch many files, that would be unreasonable because the cost is unbounded and grows with the size of your app. If we required all your addons to do something first, that would also be unreasonable, because then you're blocked by code outside your control, and the cost grows with the number of addons and their interactions. But if we require you to make small changes to ember-cli-build.js in order to get access to a new feature like embroider or ember-auto-import 2.0, that's an acceptable cost. It's bounded. No matter how big your app is, the upgrade step is the same. And it's not a breaking change, because it's opt in. There is no plan to deprecate the non-embroider build.
It could, but that is exactly the problem I'm trying to solve here. It's a problem that the division of responsibility and consequent stability is so murky in this area. It's a problem that people think broccoli-asset-rev is required, because it's not. It's a problem that the guides tell you how to use broccoli-asset-rev got into the default blueprint before we had a process for ensuring stability and consensus. It couldn't pass that bar today, because it has multiple fatal problems. Its implementation is unsafe, it doesn't work with arbitrary lazy loading, and even its name is incorrectly focused on its implementation and not its interface. It's totally understandable that Ember devs use it and trust it because that's what the signals in the blueprints and docs are telling them. But that's why I'm being a stickler here: I want to send a different signal.
No, there's no major break to use embroider. It only effects you if you turn it on. Embroider supports ember-cli back to 3.16 and forward into the upcoming 4.x. |
@ef4 Thanks for the explanation, that helps me to set expectations (my own and my colleagues) for issues like this, as we consider the jump to embroider. |
I started working on this by enabling I know I should ship a replacement instead of just complaining, but the thing is, once you're on embroider you don't need a replacement. Asset URL handling is built into webpack 5 and any other bundler you'd want to plug into embroider. Perhaps this is another feature we should just polyfill with ember-auto-import, so apps can start moving toward better patterns. 🤔 |
This is fixed in #415, because |
I'm having an issue related to this (I believe). In my app I have a |
Yes, please file an issue if you're having trouble. |
We use broccoli-asset-rev's
prepend
option to prepend assets with the CDN we use to serve them. The chunks generated by ember-auto-import 2.x are not being prefixed (which is possibly because ember-auto-import 2.x is configured to run before broccoli-asset-rev runs, which I'm guessing is because there are issues running it post-fingerprinting). Without the CDN prefix prepended, the browser is unable to find the chunks (the "regular" asset files are prepended with the CDN as expected). Is there something we can do to work around this?The text was updated successfully, but these errors were encountered: