@nx/angular 17.0.5 → 17.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +4 -9
- package/esm2022/mf/mf.mjs +1 -1
- package/esm2022/src/runtime/nx/data-persistence.mjs +1 -1
- package/executors.d.ts +2 -9
- package/executors.js +2 -7
- package/executors.json +9 -19
- package/fesm2022/nx-angular-mf.mjs.map +1 -1
- package/fesm2022/nx-angular.mjs.map +1 -1
- package/generators.d.ts +1 -1
- package/generators.js +1 -3
- package/generators.json +2 -7
- package/migrations.json +0 -451
- package/ng-package.json +2 -2
- package/package.json +26 -20
- package/plugins/component-testing.d.ts +26 -1
- package/plugins/component-testing.js +4 -15
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.d.ts +5 -0
- package/src/builders/module-federation-dev-server/module-federation-dev-server.impl.js +137 -0
- package/src/{executors → builders}/module-federation-dev-server/schema.d.ts +7 -25
- package/src/{executors → builders}/module-federation-dev-server/schema.json +6 -31
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.d.ts +1 -1
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +9 -15
- package/src/builders/utilities/module-federation.js +1 -1
- package/src/builders/webpack-browser/schema.d.ts +2 -6
- package/src/builders/webpack-browser/schema.json +15 -15
- package/src/builders/webpack-browser/validate-options.d.ts +2 -0
- package/src/builders/webpack-browser/validate-options.js +40 -0
- package/src/builders/webpack-browser/webpack-browser.impl.js +6 -8
- package/src/builders/{dev-server → webpack-dev-server}/lib/index.d.ts +0 -1
- package/src/builders/{dev-server → webpack-dev-server}/lib/index.js +0 -1
- package/src/builders/webpack-dev-server/lib/normalize-options.d.ts +2 -0
- package/src/builders/webpack-dev-server/lib/normalize-options.js +14 -0
- package/src/builders/webpack-dev-server/schema.d.ts +21 -0
- package/src/builders/{dev-server → webpack-dev-server}/schema.json +5 -42
- package/src/builders/webpack-dev-server/webpack-dev-server.impl.d.ts +4 -0
- package/src/builders/webpack-dev-server/webpack-dev-server.impl.js +105 -0
- package/src/builders/webpack-server/schema.d.ts +1 -0
- package/src/builders/webpack-server/schema.json +20 -7
- package/src/builders/webpack-server/validate-options.js +7 -0
- package/src/builders/webpack-server/webpack-server.impl.js +9 -4
- package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +3 -2
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +8 -15
- package/src/executors/browser-esbuild/lib/buildable-libs.d.ts +9 -0
- package/src/executors/{utilities → browser-esbuild/lib}/buildable-libs.js +4 -3
- package/src/executors/browser-esbuild/lib/validate-options.d.ts +2 -0
- package/src/executors/browser-esbuild/lib/validate-options.js +40 -0
- package/src/executors/browser-esbuild/schema.d.ts +1 -3
- package/src/executors/browser-esbuild/schema.json +8 -38
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/compile-ngc.transform.js +4 -6
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/write-package.transform.js +13 -25
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ngc → ngc}/compile-source-files.d.ts +2 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ngc → ngc}/compile-source-files.js +9 -14
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/styles → styles}/stylesheet-processor.d.ts +10 -5
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/styles → styles}/stylesheet-processor.js +86 -39
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ts/cache-compiler-host.d.ts +16 -0
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ts/cache-compiler-host.js +175 -0
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +17 -5
- package/src/executors/ng-packagr-lite/schema.json +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +3 -5
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +1 -1
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +6 -13
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.d.ts +10 -5
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +86 -39
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.d.ts +15 -0
- package/src/executors/package/ng-packagr-adjustments/ts/cache-compiler-host.js +197 -0
- package/src/executors/package/package.impl.d.ts +1 -1
- package/src/executors/package/package.impl.js +15 -5
- package/src/executors/package/schema.json +3 -3
- package/src/executors/utilities/tailwindcss.d.ts +7 -0
- package/src/executors/utilities/{ng-packagr/tailwindcss.js → tailwindcss.js} +22 -5
- package/src/executors/utilities/typescript.js +1 -1
- package/src/generators/add-linting/add-linting.d.ts +1 -1
- package/src/generators/add-linting/add-linting.js +15 -9
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.d.ts +2 -2
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +5 -9
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
- package/src/generators/add-linting/schema.json +1 -1
- package/src/generators/application/application.js +17 -19
- package/src/generators/application/files/base/tsconfig.app.json__tpl__ +1 -1
- package/src/generators/application/files/base/tsconfig.json__tpl__ +2 -6
- package/src/generators/application/files/ng-module/src/app/app.component.spec.ts__tpl__ +1 -3
- package/src/generators/application/files/ng-module/src/app/app.component.ts__tpl__ +2 -4
- package/src/generators/application/files/ng-module/src/app/app.module.ts__tpl__ +1 -1
- package/src/generators/application/files/ng-module/src/app/nx-welcome.component.ts__tpl__ +14 -53
- package/src/generators/application/files/ng-module/src/main.ts__tpl__ +8 -2
- package/src/generators/application/files/standalone-components/src/app/app.component.spec.ts__tpl__ +4 -6
- package/src/generators/application/files/standalone-components/src/app/app.component.ts__tpl__ +2 -4
- package/src/generators/application/files/standalone-components/src/app/app.config.ts__tpl__ +3 -3
- package/src/generators/application/files/standalone-components/src/app/nx-welcome.component.ts__tpl__ +14 -53
- package/src/generators/application/files/standalone-components/src/main.ts__tpl__ +8 -4
- package/src/generators/application/files/tsconfig.editor.json__tpl__ +5 -0
- package/src/generators/application/files/v14/.browserlistrc__tpl__ +16 -0
- package/src/generators/application/files/v14/src/environments/environment.prod.ts__tpl__ +3 -0
- package/src/generators/application/files/v14/src/environments/environment.ts__tpl__ +16 -0
- package/src/generators/application/files/v14/src/polyfills.ts__tpl__ +53 -0
- package/src/generators/application/lib/add-e2e.js +8 -22
- package/src/generators/application/lib/add-unit-test-runner.js +20 -5
- package/src/generators/application/lib/create-files.js +10 -14
- package/src/generators/application/lib/create-project.d.ts +1 -1
- package/src/generators/application/lib/create-project.js +38 -48
- package/src/generators/application/lib/index.d.ts +0 -1
- package/src/generators/application/lib/index.js +0 -1
- package/src/generators/application/lib/normalize-options.d.ts +1 -1
- package/src/generators/application/lib/normalize-options.js +6 -28
- package/src/generators/application/lib/normalized-schema.d.ts +0 -5
- package/src/generators/application/lib/update-editor-tsconfig.d.ts +1 -1
- package/src/generators/application/lib/update-editor-tsconfig.js +14 -11
- package/src/generators/application/schema.d.ts +0 -1
- package/src/generators/application/schema.json +10 -18
- package/src/generators/component/component.js +1 -4
- package/src/generators/component/files/__fileName__.spec.ts__tpl__ +3 -2
- package/src/generators/component/files/__fileName__.ts__tpl__ +2 -8
- package/src/generators/component/lib/component.js +1 -1
- package/src/generators/component/lib/index.d.ts +1 -1
- package/src/generators/component/lib/index.js +1 -1
- package/src/generators/component/lib/normalize-options.js +2 -3
- package/src/generators/{setup-mf/lib/update-tsconfig.d.ts → component/lib/validate-options.d.ts} +1 -1
- package/src/generators/component/lib/validate-options.js +8 -0
- package/src/generators/component/schema.d.ts +3 -3
- package/src/generators/component/schema.json +4 -4
- package/src/generators/component-cypress-spec/files/__componentFileName__.__fileExt__ +8 -13
- package/src/generators/component-cypress-spec/schema.json +1 -1
- package/src/generators/component-story/files/__componentFileName__.stories.ts__tmpl__ +2 -2
- package/src/generators/component-test/component-test.d.ts +1 -1
- package/src/generators/component-test/component-test.js +3 -8
- package/src/generators/component-test/files/__componentFileName__.cy.ts__tpl__ +11 -9
- package/src/generators/component-test/schema.json +1 -1
- package/src/generators/convert-to-with-mf/convert-to-with-mf.js +1 -3
- package/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +2 -3
- package/src/generators/convert-to-with-mf/schema.d.ts +0 -1
- package/src/generators/convert-to-with-mf/schema.json +0 -6
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +24 -43
- package/src/generators/directive/directive.js +1 -0
- package/src/generators/directive/files/__fileName__.ts__tpl__ +3 -1
- package/src/generators/directive/lib/index.d.ts +1 -0
- package/src/generators/directive/lib/index.js +1 -0
- package/src/generators/directive/lib/normalize-options.js +1 -3
- package/src/generators/directive/lib/validate-options.d.ts +3 -0
- package/src/generators/directive/lib/validate-options.js +8 -0
- package/src/generators/directive/schema.d.ts +3 -3
- package/src/generators/directive/schema.json +4 -4
- package/src/generators/federate-module/federate-module.js +0 -1
- package/src/generators/federate-module/lib/add-remote.d.ts +1 -1
- package/src/generators/federate-module/lib/add-remote.js +11 -2
- package/src/generators/federate-module/schema.json +3 -3
- package/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +2 -2
- package/src/generators/host/host.js +9 -8
- package/src/generators/host/lib/add-ssr.d.ts +3 -0
- package/src/generators/host/lib/{update-ssr-setup.js → add-ssr.js} +14 -8
- package/src/generators/host/lib/index.d.ts +1 -1
- package/src/generators/host/lib/index.js +1 -1
- package/src/generators/host/schema.json +6 -6
- package/src/generators/init/init.d.ts +2 -2
- package/src/generators/init/init.js +137 -19
- package/src/generators/init/schema.d.ts +9 -1
- package/src/generators/init/schema.json +59 -8
- package/src/generators/library/files/ng-module/src/lib/lib.routes.ts__tpl__ +1 -1
- package/src/generators/library/files/standalone-components/src/lib/lib.routes.ts__tpl__ +1 -1
- package/src/generators/library/lib/add-load-children.js +2 -2
- package/src/generators/library/lib/add-project.js +22 -24
- package/src/generators/library/lib/add-standalone-component.d.ts +2 -2
- package/src/generators/library/lib/add-standalone-component.js +4 -5
- package/src/generators/library/lib/normalize-options.js +5 -2
- package/src/generators/library/lib/update-tsconfig.js +3 -3
- package/src/generators/library/library.js +27 -15
- package/src/generators/library/schema.d.ts +0 -1
- package/src/generators/library/schema.json +13 -13
- package/src/generators/library-secondary-entry-point/files/src/index.ts__tmpl__ +5 -1
- package/src/generators/library-secondary-entry-point/lib/index.d.ts +1 -0
- package/src/generators/library-secondary-entry-point/lib/index.js +1 -0
- package/src/generators/library-secondary-entry-point/lib/update-linting-file-patterns.d.ts +3 -0
- package/src/generators/library-secondary-entry-point/lib/update-linting-file-patterns.js +15 -0
- package/src/generators/library-secondary-entry-point/library-secondary-entry-point.js +2 -3
- package/src/generators/library-secondary-entry-point/schema.d.ts +0 -1
- package/src/generators/library-secondary-entry-point/schema.json +3 -9
- package/src/generators/move/schema.json +1 -1
- package/src/generators/ng-add/migrate-from-angular-cli.js +1 -1
- package/src/generators/ng-add/migrators/projects/app.migrator.js +7 -50
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +23 -31
- package/src/generators/ng-add/ng-add.js +8 -1
- package/src/generators/ng-add/schema.json +1 -1
- package/src/generators/ng-add/utilities/workspace.d.ts +1 -1
- package/src/generators/ng-add/utilities/workspace.js +16 -9
- package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.models.ts__tmpl__ +1 -1
- package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.selectors.spec.ts__tmpl__ +1 -1
- package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
- package/src/generators/ngrx/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
- package/src/generators/ngrx/lib/generate-files.js +10 -1
- package/src/generators/ngrx/lib/validate-options.js +23 -0
- package/src/generators/ngrx/schema.json +3 -3
- package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.models.ts__tmpl__ +1 -1
- package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.selectors.spec.ts__tmpl__ +1 -1
- package/src/generators/ngrx-feature-store/files/no-inject/__directory__/__fileName__.effects.ts__tmpl__ +22 -0
- package/src/generators/ngrx-feature-store/files/no-inject/__directory__/__fileName__.facade.ts__tmpl__ +27 -0
- package/src/generators/ngrx-feature-store/lib/generate-files.js +12 -1
- package/src/generators/ngrx-feature-store/lib/validate-options.js +22 -0
- package/src/generators/ngrx-feature-store/schema.json +3 -3
- package/src/generators/ngrx-root-store/lib/normalize-options.js +1 -1
- package/src/generators/ngrx-root-store/lib/validate-options.js +15 -0
- package/src/generators/ngrx-root-store/schema.json +2 -2
- package/src/generators/pipe/files/__fileName__.ts__tpl__ +2 -0
- package/src/generators/pipe/lib/index.d.ts +1 -0
- package/src/generators/pipe/lib/index.js +1 -0
- package/src/generators/pipe/lib/normalize-options.js +0 -1
- package/src/generators/pipe/lib/validate-options.d.ts +3 -0
- package/src/generators/pipe/lib/validate-options.js +8 -0
- package/src/generators/pipe/pipe.js +1 -0
- package/src/generators/pipe/schema.d.ts +3 -3
- package/src/generators/pipe/schema.json +4 -4
- package/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +2 -2
- package/src/generators/remote/files/common/{pre-v17/src → src}/main.server.ts__tmpl__ +3 -1
- package/src/generators/remote/lib/{update-ssr-setup.d.ts → add-ssr.d.ts} +1 -1
- package/src/generators/remote/lib/{update-ssr-setup.js → add-ssr.js} +13 -9
- package/src/generators/remote/lib/index.d.ts +1 -1
- package/src/generators/remote/lib/index.js +1 -1
- package/src/generators/remote/remote.js +9 -7
- package/src/generators/remote/schema.json +6 -6
- package/src/generators/scam/lib/convert-component-to-scam.js +1 -2
- package/src/generators/scam/schema.d.ts +3 -3
- package/src/generators/scam/schema.json +2 -2
- package/src/generators/scam-directive/lib/convert-directive-to-scam.js +1 -2
- package/src/generators/scam-directive/scam-directive.js +1 -3
- package/src/generators/scam-directive/schema.d.ts +3 -4
- package/src/generators/scam-directive/schema.json +2 -8
- package/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +1 -2
- package/src/generators/scam-pipe/scam-pipe.js +1 -3
- package/src/generators/scam-pipe/schema.d.ts +3 -4
- package/src/generators/scam-pipe/schema.json +2 -8
- package/src/generators/scam-to-standalone/scam-to-standalone.js +7 -0
- package/src/generators/scam-to-standalone/schema.json +2 -2
- package/src/generators/setup-mf/files/host-files/app.component.spec.ts__tmpl__ +1 -3
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +0 -12
- package/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +12 -12
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +1 -13
- package/src/generators/setup-mf/lib/add-cypress-workaround.js +4 -14
- package/src/generators/setup-mf/lib/add-remote-entry.js +11 -2
- package/src/generators/setup-mf/lib/add-remote-to-host.js +1 -1
- package/src/generators/setup-mf/lib/fix-bootstrap.js +18 -10
- package/src/generators/setup-mf/lib/generate-config.js +0 -3
- package/src/generators/setup-mf/lib/index.d.ts +1 -1
- package/src/generators/setup-mf/lib/index.js +1 -1
- package/src/generators/setup-mf/lib/normalize-options.js +1 -2
- package/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +10 -10
- package/src/generators/setup-mf/lib/set-tsconfig-target.d.ts +3 -0
- package/src/generators/setup-mf/lib/set-tsconfig-target.js +16 -0
- package/src/generators/setup-mf/lib/setup-serve-target.js +1 -1
- package/src/generators/setup-mf/lib/update-host-app-routes.js +2 -2
- package/src/generators/setup-mf/schema.d.ts +0 -1
- package/src/generators/setup-mf/schema.json +3 -8
- package/src/generators/setup-mf/setup-mf.js +7 -1
- package/src/generators/setup-ssr/files/{server/server-builder/pre-v17 → ngmodule/base}/__serverFileName__ +8 -7
- package/src/generators/setup-ssr/files/ngmodule/base/src/__main__ +1 -1
- package/src/generators/setup-ssr/files/ngmodule/v14/src/__main__ +11 -0
- package/src/generators/setup-ssr/files/{server/server-builder/v17+ → standalone}/__serverFileName__ +16 -25
- package/src/generators/setup-ssr/lib/add-hydration.js +5 -11
- package/src/generators/setup-ssr/lib/generate-files.d.ts +1 -1
- package/src/generators/setup-ssr/lib/generate-files.js +16 -11
- package/src/generators/setup-ssr/lib/index.d.ts +0 -4
- package/src/generators/setup-ssr/lib/index.js +0 -4
- package/src/generators/setup-ssr/lib/normalize-options.js +1 -7
- package/src/generators/setup-ssr/lib/update-project-config.d.ts +1 -2
- package/src/generators/setup-ssr/lib/update-project-config.js +13 -46
- package/src/generators/setup-ssr/lib/validate-options.js +2 -15
- package/src/generators/setup-ssr/schema.json +4 -4
- package/src/generators/setup-ssr/setup-ssr.js +12 -18
- package/src/generators/setup-tailwind/schema.json +1 -1
- package/src/generators/stories/schema.json +1 -1
- package/src/generators/stories/stories.js +2 -2
- package/src/generators/storybook-configuration/lib/generate-stories.js +4 -6
- package/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +1 -3
- package/src/generators/storybook-configuration/schema.d.ts +1 -1
- package/src/generators/storybook-configuration/schema.json +7 -7
- package/src/generators/storybook-configuration/storybook-configuration.js +5 -8
- package/src/generators/utils/create-ts-config.d.ts +8 -0
- package/src/generators/utils/create-ts-config.js +35 -0
- package/src/generators/utils/dependencies.js +2 -1
- package/src/generators/utils/export-scam.js +2 -2
- package/src/generators/utils/project.d.ts +1 -0
- package/src/generators/utils/project.js +29 -2
- package/src/generators/utils/selector.d.ts +2 -2
- package/src/generators/utils/selector.js +4 -11
- package/src/generators/utils/testing.js +1 -24
- package/src/generators/utils/validations.d.ts +1 -0
- package/src/generators/utils/validations.js +14 -1
- package/src/generators/utils/version-utils.d.ts +2 -2
- package/src/generators/utils/version-utils.js +3 -3
- package/src/utils/backward-compatible-versions.d.ts +4 -6
- package/src/utils/backward-compatible-versions.js +22 -20
- package/src/utils/mf/utils.js +0 -7
- package/src/utils/mf/with-module-federation-ssr.js +0 -3
- package/src/utils/mf/with-module-federation.js +0 -3
- package/src/utils/nx-devkit/ast-utils.js +2 -4
- package/src/utils/nx-devkit/testing.js +31 -27
- package/src/utils/{index.d.ts → public-api.d.ts} +0 -5
- package/src/utils/{index.js → public-api.js} +0 -5
- package/src/utils/version-utils.d.ts +3 -3
- package/src/utils/versions.d.ts +11 -9
- package/src/utils/versions.js +12 -10
- package/src/builders/dev-server/dev-server.impl.d.ts +0 -4
- package/src/builders/dev-server/dev-server.impl.js +0 -160
- package/src/builders/dev-server/lib/normalize-options.d.ts +0 -2
- package/src/builders/dev-server/lib/normalize-options.js +0 -20
- package/src/builders/dev-server/lib/validate-options.d.ts +0 -2
- package/src/builders/dev-server/lib/validate-options.js +0 -22
- package/src/builders/dev-server/schema.d.ts +0 -39
- package/src/executors/application/application.impl.d.ts +0 -3
- package/src/executors/application/application.impl.js +0 -37
- package/src/executors/application/schema.d.ts +0 -8
- package/src/executors/application/schema.json +0 -682
- package/src/executors/application/utils/validate-options.d.ts +0 -2
- package/src/executors/application/utils/validate-options.js +0 -52
- package/src/executors/extract-i18n/extract-i18n.impl.d.ts +0 -3
- package/src/executors/extract-i18n/extract-i18n.impl.js +0 -43
- package/src/executors/extract-i18n/schema.d.ts +0 -8
- package/src/executors/extract-i18n/schema.json +0 -45
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.d.ts +0 -4
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +0 -56
- package/src/executors/module-federation-dev-server/lib/index.d.ts +0 -5
- package/src/executors/module-federation-dev-server/lib/index.js +0 -8
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -2
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -23
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.d.ts +0 -11
- package/src/executors/module-federation-dev-server/lib/parse-static-remotes-config.js +0 -18
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +0 -5
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +0 -29
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.d.ts +0 -9
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +0 -46
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -4
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -116
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.d.ts +0 -3
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +0 -34
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.d.ts +0 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.di.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-bundles.transform.js +0 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.di.js +0 -18
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.d.ts +0 -8
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +0 -285
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.d.ts +0 -3
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +0 -28
- package/src/executors/utilities/buildable-libs.d.ts +0 -6
- package/src/executors/utilities/esbuild-extensions.d.ts +0 -10
- package/src/executors/utilities/esbuild-extensions.js +0 -50
- package/src/executors/utilities/module-loader.d.ts +0 -15
- package/src/executors/utilities/module-loader.js +0 -52
- package/src/executors/utilities/ng-compiler-cli.d.ts +0 -1
- package/src/executors/utilities/ng-compiler-cli.js +0 -8
- package/src/executors/utilities/ng-packagr/stylesheet-processor.d.ts +0 -49
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +0 -2
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +0 -16
- package/src/executors/utilities/ng-packagr/stylesheet-processor.js +0 -209
- package/src/executors/utilities/ng-packagr/tailwindcss.d.ts +0 -7
- package/src/executors/utilities/patch-builder-context.d.ts +0 -3
- package/src/executors/utilities/patch-builder-context.js +0 -41
- package/src/generators/add-linting/lib/buildable-project.d.ts +0 -2
- package/src/generators/add-linting/lib/buildable-project.js +0 -9
- package/src/generators/application/lib/set-generator-defaults.d.ts +0 -3
- package/src/generators/application/lib/set-generator-defaults.js +0 -17
- package/src/generators/component/lib/set-generator-defaults.d.ts +0 -3
- package/src/generators/component/lib/set-generator-defaults.js +0 -14
- package/src/generators/convert-to-application-executor/convert-to-application-executor.d.ts +0 -4
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +0 -242
- package/src/generators/convert-to-application-executor/schema.d.ts +0 -4
- package/src/generators/convert-to-application-executor/schema.json +0 -26
- package/src/generators/host/files/common/v17+/src/main.server.ts__tmpl__ +0 -67
- package/src/generators/host/lib/update-ssr-setup.d.ts +0 -3
- package/src/generators/library/lib/set-generator-defaults.d.ts +0 -3
- package/src/generators/library/lib/set-generator-defaults.js +0 -15
- package/src/generators/remote/files/common/v17+/src/main.server.ts__tmpl__ +0 -73
- package/src/generators/setup-mf/files/ts-webpack/tsconfig.lint.json__tmpl__ +0 -12
- package/src/generators/setup-mf/lib/update-tsconfig.js +0 -19
- package/src/generators/setup-ssr/files/server/application-builder/__serverFileName__ +0 -56
- package/src/generators/setup-ssr/lib/add-dependencies.d.ts +0 -2
- package/src/generators/setup-ssr/lib/add-dependencies.js +0 -36
- package/src/generators/setup-ssr/lib/add-server-file.d.ts +0 -3
- package/src/generators/setup-ssr/lib/add-server-file.js +0 -31
- package/src/generators/setup-ssr/lib/constants.d.ts +0 -3
- package/src/generators/setup-ssr/lib/constants.js +0 -6
- package/src/generators/setup-ssr/lib/generate-server-ts-config.d.ts +0 -4
- package/src/generators/setup-ssr/lib/generate-server-ts-config.js +0 -29
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.d.ts +0 -3
- package/src/generators/setup-ssr/lib/set-router-initial-navigation.js +0 -93
- package/src/generators/utils/add-jest.d.ts +0 -8
- package/src/generators/utils/add-jest.js +0 -36
- package/src/generators/utils/add-mf-env-to-inputs.d.ts +0 -2
- package/src/generators/utils/add-mf-env-to-inputs.js +0 -27
- package/src/generators/utils/ensure-angular-dependencies.d.ts +0 -2
- package/src/generators/utils/ensure-angular-dependencies.js +0 -35
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.d.ts +0 -2
- package/src/generators/utils/update-app-editor-tsconfig-excluded-files.js +0 -23
- package/src/generators/utils/update-project-root-tsconfig.d.ts +0 -3
- package/src/generators/utils/update-project-root-tsconfig.js +0 -26
- package/src/migrations/update-17-1-0/browser-target-to-build-target.d.ts +0 -3
- package/src/migrations/update-17-1-0/browser-target-to-build-target.js +0 -50
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.d.ts +0 -2
- package/src/migrations/update-17-1-0/replace-nguniversal-builders.js +0 -75
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.d.ts +0 -2
- package/src/migrations/update-17-1-0/replace-nguniversal-engines.js +0 -183
- package/src/migrations/update-17-1-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-17-1-0/update-angular-cli.js +0 -23
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.d.ts +0 -2
- package/src/migrations/update-17-1-0/update-zone-js-deep-import.js +0 -37
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.d.ts +0 -2
- package/src/migrations/update-17-2-0/rename-webpack-dev-server.js +0 -40
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.d.ts +0 -2
- package/src/migrations/update-17-3-0/add-autoprefixer-dependency.js +0 -26
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.d.ts +0 -2
- package/src/migrations/update-17-3-0/add-browser-sync-dependency.js +0 -26
- package/src/migrations/update-17-3-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-17-3-0/update-angular-cli.js +0 -23
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -2
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -26
- package/src/migrations/update-18-1-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-18-1-0/update-angular-cli.js +0 -23
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.d.ts +0 -2
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +0 -53
- package/src/migrations/update-18-2-0/update-angular-cli.d.ts +0 -3
- package/src/migrations/update-18-2-0/update-angular-cli.js +0 -23
- package/src/utils/targets.d.ts +0 -2
- package/src/utils/targets.js +0 -17
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/compile-ngc.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/compile-ngc.di.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/compile-ngc.transform.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/entry-point.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/entry-point.di.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/entry-point.transform.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/entry-point.transform.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/write-package.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/write-package.di.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/entry-point/write-package.transform.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/options.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/options.di.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/package.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/ng-package → ng-package}/package.di.js +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/styles → styles}/stylesheet-processor.di.d.ts +0 -0
- /package/src/executors/ng-packagr-lite/ng-packagr-adjustments/{pre-v17/styles → styles}/stylesheet-processor.di.js +0 -0
- /package/src/generators/host/files/common/{pre-v17/src → src}/main.server.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.actions.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.effects.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.effects.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.facade.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.facade.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.reducer.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.reducer.ts__tmpl__ +0 -0
- /package/src/generators/ngrx/files/{__directory__ → base/__directory__}/__fileName__.selectors.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.actions.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.effects.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.effects.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.facade.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.facade.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.reducer.spec.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.reducer.ts__tmpl__ +0 -0
- /package/src/generators/ngrx-feature-store/files/{__directory__ → base/__directory__}/__fileName__.selectors.ts__tmpl__ +0 -0
- /package/src/generators/setup-ssr/files/{root → base}/tsconfig.server.json__tpl__ +0 -0
|
@@ -3,25 +3,19 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
5
5
|
"title": "Schema for Webpack Dev Server",
|
|
6
|
-
"description": "
|
|
7
|
-
"examplesFile": "../../../docs/dev-server-examples.md",
|
|
6
|
+
"description": "The webpack-dev-server executor is very similar to the standard dev server builder provided by the Angular Devkit. It is usually used in tandem with `@nx/angular:webpack-browser` when your Angular application uses a custom webpack configuration.",
|
|
7
|
+
"examplesFile": "../../../docs/webpack-dev-server-examples.md",
|
|
8
8
|
"type": "object",
|
|
9
9
|
"presets": [
|
|
10
10
|
{
|
|
11
11
|
"name": "Using a Different Port",
|
|
12
|
-
"keys": ["
|
|
12
|
+
"keys": ["browserTarget", "port"]
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"properties": {
|
|
16
16
|
"browserTarget": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"description": "A browser builder target to serve in the format of `project:target[:configuration]`.
|
|
19
|
-
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
|
|
20
|
-
"x-deprecated": "Use 'buildTarget' instead. It will be removed in Nx v19."
|
|
21
|
-
},
|
|
22
|
-
"buildTarget": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "A build builder target to serve in the format of `project:target[:configuration]`.",
|
|
18
|
+
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
|
25
19
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
26
20
|
},
|
|
27
21
|
"port": {
|
|
@@ -111,43 +105,12 @@
|
|
|
111
105
|
"type": "number",
|
|
112
106
|
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
113
107
|
},
|
|
114
|
-
"forceEsbuild": {
|
|
115
|
-
"type": "boolean",
|
|
116
|
-
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system. _Note: this is only supported in Angular versions >= 16.1.0_.",
|
|
117
|
-
"default": false
|
|
118
|
-
},
|
|
119
|
-
"prebundle": {
|
|
120
|
-
"description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders. _Note: this is only supported in Angular versions >= 17.2.0_.",
|
|
121
|
-
"oneOf": [
|
|
122
|
-
{ "type": "boolean" },
|
|
123
|
-
{
|
|
124
|
-
"type": "object",
|
|
125
|
-
"properties": {
|
|
126
|
-
"exclude": {
|
|
127
|
-
"description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.",
|
|
128
|
-
"type": "array",
|
|
129
|
-
"items": { "type": "string" }
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
"additionalProperties": false,
|
|
133
|
-
"required": ["exclude"]
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
108
|
"buildLibsFromSource": {
|
|
138
109
|
"type": "boolean",
|
|
139
110
|
"description": "Read buildable libraries from source instead of building them separately. If not set, it will take the value specified in the `browserTarget` options, or it will default to `true` if it's also not set in the `browserTarget` options.",
|
|
140
111
|
"x-priority": "important"
|
|
141
|
-
},
|
|
142
|
-
"esbuildMiddleware": {
|
|
143
|
-
"description": "A list of HTTP request middleware functions. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
|
144
|
-
"type": "array",
|
|
145
|
-
"items": {
|
|
146
|
-
"type": "string",
|
|
147
|
-
"description": "The path to the middleware function. Relative to the workspace root."
|
|
148
|
-
}
|
|
149
112
|
}
|
|
150
113
|
},
|
|
151
114
|
"additionalProperties": false,
|
|
152
|
-
"
|
|
115
|
+
"required": ["browserTarget"]
|
|
153
116
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Schema } from './schema';
|
|
2
|
+
export declare function executeWebpackDevServerBuilder(rawOptions: Schema, context: import('@angular-devkit/architect').BuilderContext): import("rxjs").Observable<import("@angular-devkit/build-angular").DevServerBuilderOutput>;
|
|
3
|
+
declare const _default: any;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeWebpackDevServerBuilder = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const webpack_nx_build_coordination_plugin_1 = require("@nx/webpack/src/plugins/webpack-nx-build-coordination-plugin");
|
|
6
|
+
const project_graph_1 = require("nx/src/project-graph/project-graph");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const operators_1 = require("nx/src/project-graph/operators");
|
|
9
|
+
const webpack_1 = require("../utilities/webpack");
|
|
10
|
+
const lib_1 = require("./lib");
|
|
11
|
+
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
12
|
+
const rxjs_1 = require("rxjs");
|
|
13
|
+
const operators_2 = require("rxjs/operators");
|
|
14
|
+
const js_1 = require("@nx/js");
|
|
15
|
+
function executeWebpackDevServerBuilder(rawOptions, context) {
|
|
16
|
+
process.env.NX_TSCONFIG_PATH = (0, js_1.getRootTsConfigPath)();
|
|
17
|
+
const options = (0, lib_1.normalizeOptions)(rawOptions);
|
|
18
|
+
const parsedBrowserTarget = (0, devkit_1.parseTargetString)(options.browserTarget, {
|
|
19
|
+
cwd: context.currentDirectory,
|
|
20
|
+
projectGraph: (0, devkit_1.readCachedProjectGraph)(),
|
|
21
|
+
projectName: context.target.project,
|
|
22
|
+
root: context.workspaceRoot,
|
|
23
|
+
isVerbose: false,
|
|
24
|
+
});
|
|
25
|
+
const browserTargetProjectConfiguration = (0, project_graph_1.readCachedProjectConfiguration)(parsedBrowserTarget.project);
|
|
26
|
+
const buildTarget = browserTargetProjectConfiguration.targets[parsedBrowserTarget.target];
|
|
27
|
+
const buildTargetOptions = {
|
|
28
|
+
...buildTarget.options,
|
|
29
|
+
...(parsedBrowserTarget.configuration
|
|
30
|
+
? buildTarget.configurations[parsedBrowserTarget.configuration]
|
|
31
|
+
: buildTarget.defaultConfiguration
|
|
32
|
+
? buildTarget.configurations[buildTarget.defaultConfiguration]
|
|
33
|
+
: {}),
|
|
34
|
+
};
|
|
35
|
+
const buildLibsFromSource = options.buildLibsFromSource ??
|
|
36
|
+
buildTargetOptions.buildLibsFromSource ??
|
|
37
|
+
true;
|
|
38
|
+
let pathToWebpackConfig;
|
|
39
|
+
if (buildTargetOptions.customWebpackConfig?.path) {
|
|
40
|
+
pathToWebpackConfig = (0, devkit_1.joinPathFragments)(context.workspaceRoot, buildTargetOptions.customWebpackConfig.path);
|
|
41
|
+
if (pathToWebpackConfig && !(0, fs_1.existsSync)(pathToWebpackConfig)) {
|
|
42
|
+
throw new Error(`Custom Webpack Config File Not Found!\nTo use a custom webpack config, please ensure the path to the custom webpack file is correct: \n${pathToWebpackConfig}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
let pathToIndexFileTransformer;
|
|
46
|
+
if (buildTargetOptions.indexFileTransformer) {
|
|
47
|
+
pathToIndexFileTransformer = (0, devkit_1.joinPathFragments)(context.workspaceRoot, buildTargetOptions.indexFileTransformer);
|
|
48
|
+
if (pathToIndexFileTransformer && !(0, fs_1.existsSync)(pathToIndexFileTransformer)) {
|
|
49
|
+
throw new Error(`File containing Index File Transformer function Not Found!\n Please ensure the path to the file containing the function is correct: \n${pathToIndexFileTransformer}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let dependencies;
|
|
53
|
+
if (!buildLibsFromSource) {
|
|
54
|
+
const { tsConfigPath, dependencies: foundDependencies } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(buildTargetOptions.tsConfig, context, {
|
|
55
|
+
target: parsedBrowserTarget.target,
|
|
56
|
+
});
|
|
57
|
+
dependencies = foundDependencies;
|
|
58
|
+
// We can't just pass the tsconfig path in memory to the angular builder
|
|
59
|
+
// function because we can't pass the build target options to it, the build
|
|
60
|
+
// targets options will be retrieved by the builder from the project
|
|
61
|
+
// configuration. Therefore, we patch the method in the context to retrieve
|
|
62
|
+
// the target options to overwrite the tsconfig path to use the generated
|
|
63
|
+
// one with the updated path mappings.
|
|
64
|
+
const originalGetTargetOptions = context.getTargetOptions;
|
|
65
|
+
context.getTargetOptions = async (target) => {
|
|
66
|
+
const options = await originalGetTargetOptions(target);
|
|
67
|
+
options.tsConfig = tsConfigPath;
|
|
68
|
+
return options;
|
|
69
|
+
};
|
|
70
|
+
// The buildTargetConfiguration also needs to use the generated tsconfig path
|
|
71
|
+
// otherwise the build will fail if customWebpack function/file is referencing
|
|
72
|
+
// local libs. This synchronize the behavior with webpack-browser and
|
|
73
|
+
// webpack-server implementation.
|
|
74
|
+
buildTargetOptions.tsConfig = tsConfigPath;
|
|
75
|
+
}
|
|
76
|
+
return (0, rxjs_1.from)(Promise.resolve().then(() => require('@angular-devkit/build-angular'))).pipe((0, operators_2.switchMap)(({ executeDevServerBuilder }) => executeDevServerBuilder(options, context, {
|
|
77
|
+
webpackConfiguration: async (baseWebpackConfig) => {
|
|
78
|
+
if (!buildLibsFromSource) {
|
|
79
|
+
const workspaceDependencies = dependencies
|
|
80
|
+
.filter((dep) => !(0, operators_1.isNpmProject)(dep.node))
|
|
81
|
+
.map((dep) => dep.node.name);
|
|
82
|
+
// default for `nx run-many` is --all projects
|
|
83
|
+
// by passing an empty string for --projects, run-many will default to
|
|
84
|
+
// run the target for all projects.
|
|
85
|
+
// This will occur when workspaceDependencies = []
|
|
86
|
+
if (workspaceDependencies.length > 0) {
|
|
87
|
+
baseWebpackConfig.plugins.push(
|
|
88
|
+
// @ts-expect-error - difference between angular and webpack plugin definitions bc of webpack versions
|
|
89
|
+
new webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin(`nx run-many --target=${parsedBrowserTarget.target} --projects=${workspaceDependencies.join(',')}`));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (!pathToWebpackConfig) {
|
|
93
|
+
return baseWebpackConfig;
|
|
94
|
+
}
|
|
95
|
+
return (0, webpack_1.mergeCustomWebpackConfig)(baseWebpackConfig, pathToWebpackConfig, buildTargetOptions, context.target);
|
|
96
|
+
},
|
|
97
|
+
...(pathToIndexFileTransformer
|
|
98
|
+
? {
|
|
99
|
+
indexHtml: (0, webpack_1.resolveIndexHtmlTransformer)(pathToIndexFileTransformer, buildTargetOptions.tsConfig, context.target),
|
|
100
|
+
}
|
|
101
|
+
: {}),
|
|
102
|
+
})));
|
|
103
|
+
}
|
|
104
|
+
exports.executeWebpackDevServerBuilder = executeWebpackDevServerBuilder;
|
|
105
|
+
exports.default = require('@angular-devkit/architect').createBuilder(executeWebpackDevServerBuilder);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
5
5
|
"title": "Schema for Webpack Server",
|
|
6
|
-
"description": "The webpack-server executor is very similar to the standard server builder provided by the Angular Devkit. It is usually used in tandem with `@nx/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.",
|
|
6
|
+
"description": "The webpack-dev-server executor is very similar to the standard server builder provided by the Angular Devkit. It is usually used in tandem with `@nx/angular:webpack-browser` when your Angular application uses a custom webpack configuration and NgUniversal for SSR.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"assets": {
|
|
@@ -123,11 +123,12 @@
|
|
|
123
123
|
},
|
|
124
124
|
"deployUrl": {
|
|
125
125
|
"type": "string",
|
|
126
|
-
"description": "
|
|
126
|
+
"description": "URL where files will be deployed.",
|
|
127
|
+
"x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
127
128
|
},
|
|
128
129
|
"vendorChunk": {
|
|
129
130
|
"type": "boolean",
|
|
130
|
-
"description": "Generate a
|
|
131
|
+
"description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time. _Note: supported in Angular versions >= 15.1.0_",
|
|
131
132
|
"default": false
|
|
132
133
|
},
|
|
133
134
|
"verbose": {
|
|
@@ -208,6 +209,18 @@
|
|
|
208
209
|
},
|
|
209
210
|
"default": []
|
|
210
211
|
},
|
|
212
|
+
"bundleDependencies": {
|
|
213
|
+
"description": "Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled. _Note: This is only supported in Angular versions >= 14.0.0, < 15.0.0. It was removed in Angular 15._",
|
|
214
|
+
"oneOf": [
|
|
215
|
+
{
|
|
216
|
+
"type": "boolean"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": ["none", "all"]
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
211
224
|
"statsJson": {
|
|
212
225
|
"type": "boolean",
|
|
213
226
|
"description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
|
|
@@ -289,11 +302,11 @@
|
|
|
289
302
|
"properties": {
|
|
290
303
|
"src": {
|
|
291
304
|
"type": "string",
|
|
292
|
-
"pattern": "\\.(([cm]?
|
|
305
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
293
306
|
},
|
|
294
307
|
"replaceWith": {
|
|
295
308
|
"type": "string",
|
|
296
|
-
"pattern": "\\.(([cm]?
|
|
309
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
297
310
|
}
|
|
298
311
|
},
|
|
299
312
|
"additionalProperties": false,
|
|
@@ -304,11 +317,11 @@
|
|
|
304
317
|
"properties": {
|
|
305
318
|
"replace": {
|
|
306
319
|
"type": "string",
|
|
307
|
-
"pattern": "\\.(([cm]?
|
|
320
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
308
321
|
},
|
|
309
322
|
"with": {
|
|
310
323
|
"type": "string",
|
|
311
|
-
"pattern": "\\.(([cm]?
|
|
324
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
312
325
|
}
|
|
313
326
|
},
|
|
314
327
|
"additionalProperties": false,
|
|
@@ -8,6 +8,7 @@ function validateOptions(options) {
|
|
|
8
8
|
const angularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
9
9
|
validateAssets(options, angularVersionInfo);
|
|
10
10
|
validateBuildOptimizer(options, angularVersionInfo);
|
|
11
|
+
validateBundleDependencies(options, angularVersionInfo);
|
|
11
12
|
validateVendorChunk(options, angularVersionInfo);
|
|
12
13
|
}
|
|
13
14
|
exports.validateOptions = validateOptions;
|
|
@@ -25,6 +26,12 @@ function validateBuildOptimizer(options, { major, version }) {
|
|
|
25
26
|
You can resolve this error by removing the "buildOptimizer" option.`);
|
|
26
27
|
}
|
|
27
28
|
}
|
|
29
|
+
function validateBundleDependencies(options, { major, version }) {
|
|
30
|
+
if (major >= 15 && options.bundleDependencies) {
|
|
31
|
+
throw new Error((0, devkit_1.stripIndents) `The "bundleDependencies" option was removed in Angular version 15. You are currently using "${version}".
|
|
32
|
+
You can resolve this error by removing the "bundleDependencies" option.`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
28
35
|
function validateVendorChunk(options, { version }) {
|
|
29
36
|
if ((0, semver_1.lt)(version, '15.1.0') && options.vendorChunk) {
|
|
30
37
|
throw new Error((0, devkit_1.stripIndents) `The "vendorChunk" option is supported from Angular >= 15.1.0. You are currently using "${version}".
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.executeWebpackServerBuilder = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
|
-
const path_1 = require("path");
|
|
7
6
|
const rxjs_1 = require("rxjs");
|
|
8
7
|
const operators_1 = require("rxjs/operators");
|
|
8
|
+
const semver_1 = require("semver");
|
|
9
|
+
const angular_version_utils_1 = require("../../executors/utilities/angular-version-utils");
|
|
9
10
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
10
11
|
const webpack_1 = require("../utilities/webpack");
|
|
11
12
|
const validate_options_1 = require("./validate-options");
|
|
@@ -48,12 +49,16 @@ function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWe
|
|
|
48
49
|
}
|
|
49
50
|
function executeWebpackServerBuilder(options, context) {
|
|
50
51
|
(0, validate_options_1.validateOptions)(options);
|
|
52
|
+
const installedAngularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
53
|
+
// default bundleDependencies to true if supported by Angular version
|
|
54
|
+
if ((0, semver_1.lt)(installedAngularVersionInfo.version, '15.0.0') &&
|
|
55
|
+
options.bundleDependencies === undefined) {
|
|
56
|
+
options.bundleDependencies = true;
|
|
57
|
+
}
|
|
51
58
|
options.buildLibsFromSource ??= true;
|
|
52
|
-
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${options.buildLibsFromSource}`;
|
|
53
|
-
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
|
54
59
|
if (!options.buildLibsFromSource) {
|
|
55
60
|
const { tsConfigPath } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(options.tsConfig, context);
|
|
56
|
-
options.tsConfig =
|
|
61
|
+
options.tsConfig = tsConfigPath;
|
|
57
62
|
}
|
|
58
63
|
return buildServerApp(options, context);
|
|
59
64
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type EsBuildSchema } from './schema';
|
|
1
2
|
import { type ExecutorContext } from '@nx/devkit';
|
|
2
|
-
import type
|
|
3
|
+
import { type OutputFile } from 'esbuild';
|
|
3
4
|
export default function esbuildExecutor(options: EsBuildSchema, context: ExecutorContext): AsyncGenerator<import("@angular-devkit/core").JsonObject & import("@angular-devkit/architect/src/output-schema").Schema & {
|
|
4
|
-
outputFiles?:
|
|
5
|
+
outputFiles?: OutputFile[];
|
|
5
6
|
assetFiles?: {
|
|
6
7
|
source: string;
|
|
7
8
|
destination: string;
|
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const validate_options_1 = require("./lib/validate-options");
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const buildable_libs_1 = require("./lib/buildable-libs");
|
|
4
6
|
const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
|
|
5
|
-
const angular_version_utils_1 = require("../utilities/angular-version-utils");
|
|
6
|
-
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
7
|
-
const esbuild_extensions_1 = require("../utilities/esbuild-extensions");
|
|
8
7
|
async function* esbuildExecutor(options, context) {
|
|
9
|
-
|
|
10
|
-
const { major: angularMajorVersion, version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
11
|
-
if (angularMajorVersion < 17) {
|
|
12
|
-
throw new Error((0, devkit_1.stripIndents) `The "plugins" option is only supported in Angular >= 17.0.0. You are currently using "${angularVersion}".
|
|
13
|
-
You can resolve this error by removing the "plugins" option or by migrating to Angular 17.0.0.`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
8
|
+
(0, validate_options_1.validateOptions)(options);
|
|
16
9
|
options.buildLibsFromSource ??= true;
|
|
17
|
-
const { buildLibsFromSource,
|
|
10
|
+
const { buildLibsFromSource, ...delegateExecutorOptions } = options;
|
|
18
11
|
let dependencies;
|
|
12
|
+
let projectGraph = context.projectGraph;
|
|
19
13
|
if (!buildLibsFromSource) {
|
|
20
|
-
|
|
14
|
+
projectGraph = projectGraph ?? (0, devkit_1.readCachedProjectGraph)();
|
|
15
|
+
const { tsConfigPath, dependencies: foundDependencies } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(delegateExecutorOptions.tsConfig, context, { projectGraph });
|
|
21
16
|
dependencies = foundDependencies;
|
|
22
17
|
delegateExecutorOptions.tsConfig = tsConfigPath;
|
|
23
18
|
}
|
|
24
|
-
const plugins = await (0, esbuild_extensions_1.loadPlugins)(pluginPaths, options.tsConfig);
|
|
25
19
|
const { buildEsbuildBrowser } = await Promise.resolve().then(() => require('@angular-devkit/build-angular/src/builders/browser-esbuild/index'));
|
|
26
20
|
const builderContext = await (0, ngcli_adapter_1.createBuilderContext)({
|
|
27
21
|
builderName: 'browser-esbuild',
|
|
28
22
|
description: 'Build a browser application',
|
|
29
23
|
optionSchema: await Promise.resolve().then(() => require('@angular-devkit/build-angular/src/builders/browser-esbuild/schema.json')),
|
|
30
24
|
}, context);
|
|
31
|
-
return yield* buildEsbuildBrowser(delegateExecutorOptions, builderContext
|
|
32
|
-
/* infrastructureSettings */ undefined, plugins);
|
|
25
|
+
return yield* buildEsbuildBrowser(delegateExecutorOptions, builderContext);
|
|
33
26
|
}
|
|
34
27
|
exports.default = esbuildExecutor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DependentBuildableProjectNode } from '@nx/js/src/utils/buildable-libs-utils';
|
|
2
|
+
import { type ExecutorContext, type ProjectGraph } from '@nx/devkit';
|
|
3
|
+
export declare function createTmpTsConfigForBuildableLibs(tsConfigPath: string, context: ExecutorContext, options?: {
|
|
4
|
+
projectGraph?: ProjectGraph;
|
|
5
|
+
target?: string;
|
|
6
|
+
}): {
|
|
7
|
+
tsConfigPath: string;
|
|
8
|
+
dependencies: DependentBuildableProjectNode[];
|
|
9
|
+
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTmpTsConfigForBuildableLibs = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
6
5
|
const path_1 = require("path");
|
|
7
|
-
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
function createTmpTsConfigForBuildableLibs(tsConfigPath, context, options) {
|
|
8
8
|
let dependencies;
|
|
9
|
-
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)(
|
|
9
|
+
const result = (0, buildable_libs_utils_1.calculateProjectDependencies)(options?.projectGraph ?? (0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, options?.target ?? context.targetName, context.configurationName);
|
|
10
10
|
dependencies = result.dependencies;
|
|
11
11
|
const tmpTsConfigPath = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.root, tsConfigPath), context.root, result.target.data.root, dependencies);
|
|
12
12
|
process.env.NX_TSCONFIG_PATH = tmpTsConfigPath;
|
|
13
|
+
// Angular EsBuild Builder appends the workspaceRoot to the config path, so remove it.
|
|
13
14
|
const tmpTsConfigPathWithoutWorkspaceRoot = tmpTsConfigPath.replace(context.root, '');
|
|
14
15
|
return { tsConfigPath: tmpTsConfigPathWithoutWorkspaceRoot, dependencies };
|
|
15
16
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOptions = void 0;
|
|
4
|
+
const angular_version_utils_1 = require("../../utilities/angular-version-utils");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
function validateOptions(options) {
|
|
8
|
+
const angularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
9
|
+
validatePolyfills(options, angularVersionInfo);
|
|
10
|
+
validateStyles(options, angularVersionInfo);
|
|
11
|
+
}
|
|
12
|
+
exports.validateOptions = validateOptions;
|
|
13
|
+
function validatePolyfills(options, { major, version }) {
|
|
14
|
+
if (major < 15 && Array.isArray(options.polyfills)) {
|
|
15
|
+
throw new Error((0, devkit_1.stripIndents) `The array syntax for the "polyfills" option is supported from Angular >= 15.0.0. You are currently using "${version}".
|
|
16
|
+
You can resolve this error by removing the "polyfills" option, setting it to a string value or migrating to Angular 15.0.0.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function validateStyles(options, { major, version }) {
|
|
20
|
+
if (!options.styles || !options.styles.length) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (major < 15) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const stylusFiles = [];
|
|
27
|
+
options.styles.forEach((style) => {
|
|
28
|
+
const styleFile = typeof style === 'string' ? style : style.input;
|
|
29
|
+
if ((0, path_1.extname)(styleFile) === '.styl') {
|
|
30
|
+
stylusFiles.push(styleFile);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (stylusFiles.length) {
|
|
34
|
+
throw new Error((0, devkit_1.stripIndents) `Stylus is not supported since Angular v15. You're currently using "${version}".
|
|
35
|
+
You have the "styles" option with the following file(s) using the ".styl" extension: ${stylusFiles
|
|
36
|
+
.map((x) => `"${x}"`)
|
|
37
|
+
.join(', ')}.
|
|
38
|
+
Make sure to convert them to a supported extension (".css", ".scss", ".sass", ".less").`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { PluginSpec } from '../utilities/esbuild-extensions';
|
|
1
|
+
import { Schema } from '@angular-devkit/build-angular/src/builders/browser-esbuild/schema';
|
|
3
2
|
|
|
4
3
|
export interface EsBuildSchema extends Schema {
|
|
5
4
|
buildLibsFromSource?: boolean;
|
|
6
|
-
plugins?: string[] | PluginSpec[];
|
|
7
5
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
3
|
"title": "Schema for Nx ESBuild Executor",
|
|
4
4
|
"description": "Nx ESBuild Executor supporting Incremental Builds.",
|
|
5
|
-
"examplesFile": "../../../docs/browser-esbuild-examples.md",
|
|
6
5
|
"outputCapture": "direct-nodejs",
|
|
7
6
|
"type": "object",
|
|
8
7
|
"properties": {
|
|
@@ -216,7 +215,7 @@
|
|
|
216
215
|
},
|
|
217
216
|
"outputPath": {
|
|
218
217
|
"type": "string",
|
|
219
|
-
"description": "The full path for the new output directory, relative to the current workspace."
|
|
218
|
+
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
|
|
220
219
|
},
|
|
221
220
|
"resourcesOutputPath": {
|
|
222
221
|
"type": "string",
|
|
@@ -265,12 +264,12 @@
|
|
|
265
264
|
},
|
|
266
265
|
"vendorChunk": {
|
|
267
266
|
"type": "boolean",
|
|
268
|
-
"description": "Generate a
|
|
267
|
+
"description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.",
|
|
269
268
|
"default": false
|
|
270
269
|
},
|
|
271
270
|
"commonChunk": {
|
|
272
271
|
"type": "boolean",
|
|
273
|
-
"description": "Generate a
|
|
272
|
+
"description": "Generate a seperate bundle containing code used across multiple bundles.",
|
|
274
273
|
"default": true
|
|
275
274
|
},
|
|
276
275
|
"baseHref": {
|
|
@@ -279,7 +278,8 @@
|
|
|
279
278
|
},
|
|
280
279
|
"deployUrl": {
|
|
281
280
|
"type": "string",
|
|
282
|
-
"description": "
|
|
281
|
+
"description": "URL where files will be deployed.",
|
|
282
|
+
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
283
283
|
},
|
|
284
284
|
"verbose": {
|
|
285
285
|
"type": "boolean",
|
|
@@ -401,7 +401,6 @@
|
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
"const": false,
|
|
404
|
-
"type": "boolean",
|
|
405
404
|
"description": "Does not generate an `index.html` file."
|
|
406
405
|
}
|
|
407
406
|
]
|
|
@@ -430,7 +429,7 @@
|
|
|
430
429
|
"enum": ["none", "anonymous", "use-credentials"]
|
|
431
430
|
},
|
|
432
431
|
"allowedCommonJsDependencies": {
|
|
433
|
-
"description": "A list of CommonJS
|
|
432
|
+
"description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
|
|
434
433
|
"type": "array",
|
|
435
434
|
"items": {
|
|
436
435
|
"type": "string"
|
|
@@ -441,35 +440,6 @@
|
|
|
441
440
|
"type": "boolean",
|
|
442
441
|
"description": "Read buildable libraries from source instead of building them separately.",
|
|
443
442
|
"default": true
|
|
444
|
-
},
|
|
445
|
-
"plugins": {
|
|
446
|
-
"description": "A list of ESBuild plugins. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
|
447
|
-
"type": "array",
|
|
448
|
-
"items": {
|
|
449
|
-
"oneOf": [
|
|
450
|
-
{
|
|
451
|
-
"type": "object",
|
|
452
|
-
"properties": {
|
|
453
|
-
"path": {
|
|
454
|
-
"type": "string",
|
|
455
|
-
"description": "The path to the plugin. Relative to the workspace root."
|
|
456
|
-
},
|
|
457
|
-
"options": {
|
|
458
|
-
"type": "object",
|
|
459
|
-
"description": "The options to provide to the plugin.",
|
|
460
|
-
"properties": {},
|
|
461
|
-
"additionalProperties": true
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
"additionalProperties": false,
|
|
465
|
-
"required": ["path"]
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"type": "string",
|
|
469
|
-
"description": "The path to the plugin. Relative to the workspace root."
|
|
470
|
-
}
|
|
471
|
-
]
|
|
472
|
-
}
|
|
473
443
|
}
|
|
474
444
|
},
|
|
475
445
|
"additionalProperties": false,
|
|
@@ -518,11 +488,11 @@
|
|
|
518
488
|
"properties": {
|
|
519
489
|
"replace": {
|
|
520
490
|
"type": "string",
|
|
521
|
-
"pattern": "\\.(([cm]?
|
|
491
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
522
492
|
},
|
|
523
493
|
"with": {
|
|
524
494
|
"type": "string",
|
|
525
|
-
"pattern": "\\.(([cm]?
|
|
495
|
+
"pattern": "\\.(([cm]?j|t)sx?|json)$"
|
|
526
496
|
}
|
|
527
497
|
},
|
|
528
498
|
"additionalProperties": false,
|
|
@@ -14,15 +14,13 @@ const nodes_1 = require("ng-packagr/lib/ng-package/nodes");
|
|
|
14
14
|
const tsconfig_1 = require("ng-packagr/lib/ts/tsconfig");
|
|
15
15
|
const path = require("path");
|
|
16
16
|
const ts = require("typescript");
|
|
17
|
-
const angular_version_utils_1 = require("
|
|
17
|
+
const angular_version_utils_1 = require("../../../../utilities/angular-version-utils");
|
|
18
18
|
const compile_source_files_1 = require("../../ngc/compile-source-files");
|
|
19
19
|
const nxCompileNgcTransformFactory = (StylesheetProcessor, options) => {
|
|
20
20
|
return (0, transform_1.transformFromPromise)(async (graph) => {
|
|
21
|
-
const entryPoints = graph.filter(nodes_1.isEntryPoint);
|
|
22
|
-
const entryPoint = graph.find((0, nodes_1.isEntryPointInProgress)());
|
|
23
|
-
const ngPackageNode = graph.find(nodes_1.isPackage);
|
|
24
|
-
const projectBasePath = ngPackageNode.data.primary.basePath;
|
|
25
21
|
try {
|
|
22
|
+
const entryPoint = graph.find((0, nodes_1.isEntryPointInProgress)());
|
|
23
|
+
const entryPoints = graph.filter(nodes_1.isEntryPoint);
|
|
26
24
|
// Add paths mappings for dependencies
|
|
27
25
|
const tsConfig = (0, tsconfig_1.setDependenciesTsConfigPaths)(entryPoint.data.tsConfig, entryPoints);
|
|
28
26
|
const angularVersion = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
@@ -33,7 +31,7 @@ const nxCompileNgcTransformFactory = (StylesheetProcessor, options) => {
|
|
|
33
31
|
: entryPoint.data.destinationFiles.esm2022;
|
|
34
32
|
const { basePath, cssUrl, styleIncludePaths } = entryPoint.data.entryPoint;
|
|
35
33
|
const { moduleResolutionCache } = entryPoint.cache;
|
|
36
|
-
entryPoint.cache.stylesheetProcessor ??= new StylesheetProcessor(
|
|
34
|
+
entryPoint.cache.stylesheetProcessor ??= new StylesheetProcessor(basePath, cssUrl, styleIncludePaths, options.cacheEnabled && options.cacheDirectory, options.watch, options.tailwindConfig);
|
|
37
35
|
await (0, compile_source_files_1.compileSourceFiles)(graph, tsConfig, moduleResolutionCache, options, {
|
|
38
36
|
outDir: path.dirname(esmModulePath),
|
|
39
37
|
declarationDir: path.dirname(declarations),
|