Nx: add crossOrigin to build options

Created on 3 Feb 2020  路  4Comments  路  Source: nrwl/nx

Prerequisites

I'm running nx 8.12.0 version

Expected Behavior

https://github.com/nrwl/nx/blob/dbd94926bf5b7fa59bcfd08492d592a9a1770b27/packages/web/src/utils/third-party/browser/index.ts#L620
crossOrigin attribute will be added to the script element when writeIndexHtml
but https://github.com/nrwl/nx/blob/b6e6b3f1c3856a359d064ee96fb7357fd3e36202/packages/web/src/builders/build/build.impl.ts#L136
buildOptions doesn't pass in crossOrigin param.

Other

https://github.com/angular/angular-cli/pull/14844

Thank you!

react stale bug

Most helpful comment

This is a critical bug for Safari browser support with no work around if you require authentication cookies to be sent for a JS asset.

https://stackoverflow.com/questions/29416010/why-the-browser-doesnt-send-cookies-while-requesting-a-javascript-file#comment104322427_52559612

I'd honestly even prefer a way to disable ESM entirely if possible from the build process, but that doesn't look like an option either.

All 4 comments

+1 here, please add support of crossOrigin

This is a critical bug for Safari browser support with no work around if you require authentication cookies to be sent for a JS asset.

https://stackoverflow.com/questions/29416010/why-the-browser-doesnt-send-cookies-while-requesting-a-javascript-file#comment104322427_52559612

I'd honestly even prefer a way to disable ESM entirely if possible from the build process, but that doesn't look like an option either.

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nrwl community! 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IonFoXx picture IonFoXx  路  3Comments

ZempTime picture ZempTime  路  3Comments

olakara picture olakara  路  3Comments

about-code picture about-code  路  3Comments

vimalraj-a picture vimalraj-a  路  3Comments