fix(react): exposed the crossOrigin option for web builder options (#2830)
ISSUES CLOSED: 2419 Co-authored-by: danielji <daniel.ji@innovid.com>
This commit is contained in:
parent
416e3eb837
commit
25432a6395
@ -42,6 +42,12 @@ Type: `boolean`
|
||||
|
||||
Use a separate bundle containing code used across multiple bundles.
|
||||
|
||||
### crossOrigin
|
||||
|
||||
Type: `string`
|
||||
|
||||
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'
|
||||
|
||||
### deployUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -43,6 +43,12 @@ Type: `boolean`
|
||||
|
||||
Use a separate bundle containing code used across multiple bundles.
|
||||
|
||||
### crossOrigin
|
||||
|
||||
Type: `string`
|
||||
|
||||
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'
|
||||
|
||||
### deployUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -21,6 +21,7 @@ import {
|
||||
calculateProjectDependencies,
|
||||
createTmpTsConfig,
|
||||
} from '@nrwl/workspace/src/utils/buildable-libs-utils';
|
||||
import { CrossOriginValue } from '../../utils/third-party/cli-files/utilities/index-file/augment-index-html';
|
||||
|
||||
export interface WebBuildBuilderOptions extends BuildBuilderOptions {
|
||||
index: string;
|
||||
@ -29,6 +30,7 @@ export interface WebBuildBuilderOptions extends BuildBuilderOptions {
|
||||
deployUrl: string;
|
||||
|
||||
extractCss?: boolean;
|
||||
crossOrigin?: CrossOriginValue;
|
||||
|
||||
polyfills?: string;
|
||||
es2015Polyfills?: string;
|
||||
@ -150,6 +152,7 @@ export function run(options: WebBuildBuilderOptions, context: BuilderContext) {
|
||||
const success = [result1, result2].every((result) => result.success);
|
||||
return (options.optimization
|
||||
? writeIndexHtml({
|
||||
crossOrigin: options.crossOrigin,
|
||||
host,
|
||||
outputPath: devkitJoin(
|
||||
normalize(options.outputPath),
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
"description": "Web application build target options for Build Facade",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"crossOrigin": {
|
||||
"type": "string",
|
||||
"description": "The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'"
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"description": "The name of the main entry-point file."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user