Skip to content
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

Cannot enforce order of <script> tags #9879

Closed
Hades32 opened this issue Jul 29, 2024 · 0 comments · Fixed by #9955
Closed

Cannot enforce order of <script> tags #9879

Hades32 opened this issue Jul 29, 2024 · 0 comments · Fixed by #9955

Comments

@Hades32
Copy link

Hades32 commented Jul 29, 2024

🐛 bug report

I have the need (upstream validation) to make sure that a certain <script> tag, pointing to an external URL, is the very first script on a page. Until Parcel 2.8.3 this worked as expected by just placing it first in the file. In recent version a index.runtime.243658d2.js is placed before my first script and thus breaks the validation

🎛 Configuration (.babelrc, package.json, cli command)

package.json contains this, maybe relevant

{
	"targets": {
		"default": {
			"publicUrl": "./"
		}
	}
}

🤔 Expected Behavior

keep my script order as much as possible

😯 Current Behavior

inserts a new script not only before generated assets, but even before external ones

💁 Possible Solution

don't place the helper script in front of EVERY script, but just before the first assets script

🔦 Context

I'm submitting the code to a extension store and they really want to be sure that their "security" script runs first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant