Open lukecoy opened 3 years ago
The only reason extraPublicTrees
exists as an argument is because when we replace app.toTree()
with compatBuild()
, people who were before passing the optional extra argument into toTree
need a place to put it. It's a compatibility feature, and in general customizing anything about your embroider build output via broccoli is strongly discouraged.
But that's not really the right solution here anyway. I think what you might need is a way to control which html files embroider considers as entrypoints.
But also, what is actually being broken by this rewriting? Because the rewriting is spec-compliant: browsers were already interpreting your file that way.
But also, what is actually being broken by this rewriting? Because the rewriting is spec-compliant: browsers were already interpreting your file that way.
@ef4 - Agreed, HTML should be formatted this way anyways. My usage is a weird edge case involving the google site verification HTML file, which is consumed by SEO tooling. It's a HTML file with raw text, no elements. Unfortunately, the Google Admin Console wont work with the serialized HTML output.
Should Embroider expose a mechanism to support overwriting parts of the build tree? Context below.
When building an embroider project with HTML files in
public/*.html
, JSDOM will attempt to serialize the contents of those files, which will potentially change its contents. For example:this HTML file:
foo bar
serializes into this indist/
:<html><head></head><body>foo bar</body></html>
I'm not sure if this is expected behavior or not (ember-cli does not currently do this), but to override this behavior, I do:
... this works fine, but curious if there's a native mechanism to support something like this, similar to what
extraPublicTrees
accomplishes. Thanks!