vikerman / rollup-plugin-hoist-import-deps

A rollup plugin to speed up lazy loading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow configuring preload crossorigin

LarsDenBakker opened this issue · comments

Safari has a bug where cross origin anonymous doesn't send along credentials on the same origin: https://bugs.webkit.org/show_bug.cgi?id=171566

I need certain cookies when fetching JS resources. Could you add an option to not set any cross origin attribute at all for the preload?

Offline discussion -

"When do we actually need crossorigin attribute? Can we just remove it?"

"I think es modules are fetched with crossorigin anonymous, and you need credentials to match to hit the cache
In my case im compiling to systemjs, which uses script tags
Its not a problem if you don't actually use cookies for js files, then the current default works for all."