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.
|
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
|
### deployUrl
|
||||||
|
|
||||||
Type: `string`
|
Type: `string`
|
||||||
|
|||||||
@ -43,6 +43,12 @@ Type: `boolean`
|
|||||||
|
|
||||||
Use a separate bundle containing code used across multiple bundles.
|
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
|
### deployUrl
|
||||||
|
|
||||||
Type: `string`
|
Type: `string`
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import {
|
|||||||
calculateProjectDependencies,
|
calculateProjectDependencies,
|
||||||
createTmpTsConfig,
|
createTmpTsConfig,
|
||||||
} from '@nrwl/workspace/src/utils/buildable-libs-utils';
|
} 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 {
|
export interface WebBuildBuilderOptions extends BuildBuilderOptions {
|
||||||
index: string;
|
index: string;
|
||||||
@ -29,6 +30,7 @@ export interface WebBuildBuilderOptions extends BuildBuilderOptions {
|
|||||||
deployUrl: string;
|
deployUrl: string;
|
||||||
|
|
||||||
extractCss?: boolean;
|
extractCss?: boolean;
|
||||||
|
crossOrigin?: CrossOriginValue;
|
||||||
|
|
||||||
polyfills?: string;
|
polyfills?: string;
|
||||||
es2015Polyfills?: string;
|
es2015Polyfills?: string;
|
||||||
@ -150,6 +152,7 @@ export function run(options: WebBuildBuilderOptions, context: BuilderContext) {
|
|||||||
const success = [result1, result2].every((result) => result.success);
|
const success = [result1, result2].every((result) => result.success);
|
||||||
return (options.optimization
|
return (options.optimization
|
||||||
? writeIndexHtml({
|
? writeIndexHtml({
|
||||||
|
crossOrigin: options.crossOrigin,
|
||||||
host,
|
host,
|
||||||
outputPath: devkitJoin(
|
outputPath: devkitJoin(
|
||||||
normalize(options.outputPath),
|
normalize(options.outputPath),
|
||||||
|
|||||||
@ -3,6 +3,10 @@
|
|||||||
"description": "Web application build target options for Build Facade",
|
"description": "Web application build target options for Build Facade",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"crossOrigin": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'"
|
||||||
|
},
|
||||||
"main": {
|
"main": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The name of the main entry-point file."
|
"description": "The name of the main entry-point file."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user