@servicetitan/startup 36.4.0 → 37.0.1
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/bin/analyze.js +3 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +4 -5
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-vite.d.ts.map +1 -1
- package/dist/cli/commands/bundle-vite.js +18 -1
- package/dist/cli/commands/bundle-vite.js.map +1 -1
- package/dist/cli/commands/registry/build.d.ts +6 -0
- package/dist/cli/commands/registry/build.d.ts.map +1 -1
- package/dist/cli/commands/registry/build.js +10 -1
- package/dist/cli/commands/registry/build.js.map +1 -1
- package/dist/cli/commands/registry/command-registry.d.ts +12 -28
- package/dist/cli/commands/registry/command-registry.d.ts.map +1 -1
- package/dist/cli/commands/registry/command-registry.js +0 -3
- package/dist/cli/commands/registry/command-registry.js.map +1 -1
- package/dist/cli/commands/registry/start.d.ts +6 -0
- package/dist/cli/commands/registry/start.d.ts.map +1 -1
- package/dist/cli/commands/registry/start.js +10 -1
- package/dist/cli/commands/registry/start.js.map +1 -1
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -1
- package/dist/cli/commands/review/rules/index.js +2 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -1
- package/dist/cli/commands/review/rules/require-compatible-typescript.d.ts +13 -0
- package/dist/cli/commands/review/rules/require-compatible-typescript.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-compatible-typescript.js +72 -0
- package/dist/cli/commands/review/rules/require-compatible-typescript.js.map +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +3 -4
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/test/runners/vitest.d.ts.map +1 -1
- package/dist/cli/commands/test/runners/vitest.js +7 -1
- package/dist/cli/commands/test/runners/vitest.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/get-bundle-command.d.ts +3 -0
- package/dist/cli/utils/get-bundle-command.d.ts.map +1 -0
- package/dist/cli/utils/get-bundle-command.js +16 -0
- package/dist/cli/utils/get-bundle-command.js.map +1 -0
- package/dist/cli/utils/get-exit-code.d.ts +12 -0
- package/dist/cli/utils/get-exit-code.d.ts.map +1 -0
- package/dist/cli/utils/get-exit-code.js +26 -0
- package/dist/cli/utils/get-exit-code.js.map +1 -0
- package/dist/cli/utils/index.d.ts +3 -0
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +3 -0
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/resolve-bundler.d.ts +8 -0
- package/dist/cli/utils/resolve-bundler.d.ts.map +1 -0
- package/dist/cli/utils/resolve-bundler.js +24 -0
- package/dist/cli/utils/resolve-bundler.js.map +1 -0
- package/dist/core/bundle-report.d.ts +4 -0
- package/dist/core/bundle-report.d.ts.map +1 -0
- package/dist/core/bundle-report.js +43 -0
- package/dist/core/bundle-report.js.map +1 -0
- package/dist/core/check-resource/check-resource.d.ts +5 -3
- package/dist/core/check-resource/check-resource.d.ts.map +1 -1
- package/dist/core/check-resource/check-resource.js +20 -13
- package/dist/core/check-resource/check-resource.js.map +1 -1
- package/dist/core/check-resource/get-peer-dependency-meta.d.ts +11 -1
- package/dist/core/check-resource/get-peer-dependency-meta.d.ts.map +1 -1
- package/dist/core/check-resource/get-peer-dependency-meta.js +58 -2
- package/dist/core/check-resource/get-peer-dependency-meta.js.map +1 -1
- package/dist/core/check-resource/index.d.ts +1 -1
- package/dist/core/check-resource/index.d.ts.map +1 -1
- package/dist/core/check-resource/index.js.map +1 -1
- package/dist/core/check-resource/is-resolvable.d.ts +7 -0
- package/dist/core/check-resource/is-resolvable.d.ts.map +1 -0
- package/dist/core/check-resource/is-resolvable.js +31 -0
- package/dist/core/check-resource/is-resolvable.js.map +1 -0
- package/dist/core/check-resource/types.d.ts +1 -0
- package/dist/core/check-resource/types.d.ts.map +1 -1
- package/dist/core/chunk-patterns.d.ts +7 -0
- package/dist/core/chunk-patterns.d.ts.map +1 -0
- package/dist/core/chunk-patterns.js +37 -0
- package/dist/core/chunk-patterns.js.map +1 -0
- package/dist/core/create-build-context.d.ts +0 -1
- package/dist/core/create-build-context.d.ts.map +1 -1
- package/dist/core/create-build-context.js +2 -2
- package/dist/core/create-build-context.js.map +1 -1
- package/dist/core/create-extension-regexp.d.ts +5 -0
- package/dist/core/create-extension-regexp.d.ts.map +1 -0
- package/dist/core/create-extension-regexp.js +45 -0
- package/dist/core/create-extension-regexp.js.map +1 -0
- package/dist/core/get-process-env.d.ts +3 -0
- package/dist/core/get-process-env.d.ts.map +1 -0
- package/dist/core/get-process-env.js +25 -0
- package/dist/core/get-process-env.js.map +1 -0
- package/dist/core/index.d.ts +8 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/moment-locales.d.ts +2 -0
- package/dist/core/moment-locales.d.ts.map +1 -0
- package/dist/core/moment-locales.js +21 -0
- package/dist/core/moment-locales.js.map +1 -0
- package/dist/core/resolve-output-path.d.ts +3 -0
- package/dist/core/resolve-output-path.d.ts.map +1 -0
- package/dist/core/resolve-output-path.js +25 -0
- package/dist/core/resolve-output-path.js.map +1 -0
- package/dist/core/resolve-output-root.d.ts +3 -0
- package/dist/core/resolve-output-root.d.ts.map +1 -0
- package/dist/core/resolve-output-root.js +23 -0
- package/dist/core/resolve-output-root.js.map +1 -0
- package/dist/core/sort-shared-css.d.ts +2 -0
- package/dist/core/sort-shared-css.d.ts.map +1 -0
- package/dist/core/sort-shared-css.js +20 -0
- package/dist/core/sort-shared-css.js.map +1 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/cypress/config/index.d.ts +1 -0
- package/dist/cypress/config/index.d.ts.map +1 -1
- package/dist/cypress/config/index.js +1 -0
- package/dist/cypress/config/index.js.map +1 -1
- package/dist/cypress/config/vite-config.d.ts +3 -0
- package/dist/cypress/config/vite-config.d.ts.map +1 -0
- package/dist/cypress/config/vite-config.js +58 -0
- package/dist/cypress/config/vite-config.js.map +1 -0
- package/dist/jest/resolver.d.ts.map +1 -1
- package/dist/jest/resolver.js +20 -1
- package/dist/jest/resolver.js.map +1 -1
- package/dist/storybook-config/index.d.ts +1 -0
- package/dist/storybook-config/index.d.ts.map +1 -1
- package/dist/storybook-config/index.js +1 -0
- package/dist/storybook-config/index.js.map +1 -1
- package/dist/storybook-config/vite-final.d.ts +7 -0
- package/dist/storybook-config/vite-final.d.ts.map +1 -0
- package/dist/storybook-config/vite-final.js +86 -0
- package/dist/storybook-config/vite-final.js.map +1 -0
- package/dist/utils/get-configuration.d.ts +15 -10
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +32 -2
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-package-name.d.ts +2 -1
- package/dist/utils/get-package-name.d.ts.map +1 -1
- package/dist/utils/get-package-name.js +4 -2
- package/dist/utils/get-package-name.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +6 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/validate-shared-dependencies.d.ts.map +1 -1
- package/dist/utils/validate-shared-dependencies.js +4 -0
- package/dist/utils/validate-shared-dependencies.js.map +1 -1
- package/dist/vite/build-shared-dependencies.d.ts.map +1 -1
- package/dist/vite/build-shared-dependencies.js +1 -2
- package/dist/vite/build-shared-dependencies.js.map +1 -1
- package/dist/vite/config/asset-file-names.d.ts +4 -0
- package/dist/vite/config/asset-file-names.d.ts.map +1 -0
- package/dist/vite/config/asset-file-names.js +29 -0
- package/dist/vite/config/asset-file-names.js.map +1 -0
- package/dist/vite/config/base-config.d.ts.map +1 -1
- package/dist/vite/config/base-config.js +67 -40
- package/dist/vite/config/base-config.js.map +1 -1
- package/dist/vite/config/code-splitting.d.ts +4 -0
- package/dist/vite/config/code-splitting.d.ts.map +1 -0
- package/dist/vite/config/code-splitting.js +48 -0
- package/dist/vite/config/code-splitting.js.map +1 -0
- package/dist/vite/config/create-css-config.d.ts +3 -0
- package/dist/vite/config/create-css-config.d.ts.map +1 -0
- package/dist/vite/config/create-css-config.js +26 -0
- package/dist/vite/config/create-css-config.js.map +1 -0
- package/dist/vite/config/create-filtering-logger.d.ts +3 -0
- package/dist/vite/config/create-filtering-logger.d.ts.map +1 -0
- package/dist/vite/config/create-filtering-logger.js +37 -0
- package/dist/vite/config/create-filtering-logger.js.map +1 -0
- package/dist/vite/config/create-vite-build-context.d.ts +2 -1
- package/dist/vite/config/create-vite-build-context.d.ts.map +1 -1
- package/dist/vite/config/create-vite-build-context.js.map +1 -1
- package/dist/vite/config/create-vite-config.d.ts.map +1 -1
- package/dist/vite/config/create-vite-config.js +30 -13
- package/dist/vite/config/create-vite-config.js.map +1 -1
- package/dist/vite/config/get-warmup-client-files.d.ts +3 -0
- package/dist/vite/config/get-warmup-client-files.d.ts.map +1 -0
- package/dist/vite/config/get-warmup-client-files.js +26 -0
- package/dist/vite/config/get-warmup-client-files.js.map +1 -0
- package/dist/vite/index.html +1 -0
- package/dist/vite/plugins/bundle-stat-plugin.d.ts +4 -0
- package/dist/vite/plugins/bundle-stat-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/bundle-stat-plugin.js +32 -0
- package/dist/vite/plugins/bundle-stat-plugin.js.map +1 -0
- package/dist/vite/plugins/chain-source-maps-plugin.d.ts +3 -0
- package/dist/vite/plugins/chain-source-maps-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/chain-source-maps-plugin.js +37 -0
- package/dist/vite/plugins/chain-source-maps-plugin.js.map +1 -0
- package/dist/vite/plugins/clean-plugin.d.ts +4 -0
- package/dist/vite/plugins/clean-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/clean-plugin.js +63 -0
- package/dist/vite/plugins/clean-plugin.js.map +1 -0
- package/dist/vite/plugins/design-system-guard-plugin.d.ts +4 -0
- package/dist/vite/plugins/design-system-guard-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/design-system-guard-plugin.js +35 -0
- package/dist/vite/plugins/design-system-guard-plugin.js.map +1 -0
- package/dist/vite/plugins/ignore-modules-plugin.d.ts +21 -3
- package/dist/vite/plugins/ignore-modules-plugin.d.ts.map +1 -1
- package/dist/vite/plugins/ignore-modules-plugin.js +22 -8
- package/dist/vite/plugins/ignore-modules-plugin.js.map +1 -1
- package/dist/vite/plugins/index.d.ts +7 -0
- package/dist/vite/plugins/index.d.ts.map +1 -1
- package/dist/vite/plugins/index.js +7 -0
- package/dist/vite/plugins/index.js.map +1 -1
- package/dist/vite/plugins/istanbul-plugin.d.ts +4 -0
- package/dist/vite/plugins/istanbul-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/istanbul-plugin.js +27 -0
- package/dist/vite/plugins/istanbul-plugin.js.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/index.d.ts +2 -0
- package/dist/vite/plugins/magic-comments-plugin/index.d.ts.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/index.js +20 -0
- package/dist/vite/plugins/magic-comments-plugin/index.js.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.d.ts +4 -0
- package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.js +63 -0
- package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.js.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/parse-magic-comments.d.ts +6 -0
- package/dist/vite/plugins/magic-comments-plugin/parse-magic-comments.d.ts.map +1 -0
- package/dist/vite/plugins/magic-comments-plugin/parse-magic-comments.js +40 -0
- package/dist/vite/plugins/magic-comments-plugin/parse-magic-comments.js.map +1 -0
- package/dist/vite/plugins/metadata-plugin.js +2 -2
- package/dist/vite/plugins/metadata-plugin.js.map +1 -1
- package/dist/vite/plugins/moment-locales-plugin.d.ts +5 -0
- package/dist/vite/plugins/moment-locales-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/moment-locales-plugin.js +50 -0
- package/dist/vite/plugins/moment-locales-plugin.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assemble-iife.d.ts +14 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assemble-iife.d.ts.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assemble-iife.js +100 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assemble-iife.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assert-no-dynamic-css.d.ts +3 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assert-no-dynamic-css.d.ts.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assert-no-dynamic-css.js +56 -0
- package/dist/vite/plugins/shared-dependencies-plugin/assert-no-dynamic-css.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/flatten.d.ts +2 -0
- package/dist/vite/plugins/shared-dependencies-plugin/flatten.d.ts.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/flatten.js +19 -0
- package/dist/vite/plugins/shared-dependencies-plugin/flatten.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/index.d.ts +2 -0
- package/dist/vite/plugins/shared-dependencies-plugin/index.d.ts.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/index.js +20 -0
- package/dist/vite/plugins/shared-dependencies-plugin/index.js.map +1 -0
- package/dist/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.d.ts.map +1 -0
- package/dist/vite/plugins/{shared-dependencies-plugin.js → shared-dependencies-plugin/shared-dependencies-plugin.js} +29 -107
- package/dist/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.js.map +1 -0
- package/dist/vite/plugins/utils/import-esm.d.ts +2 -0
- package/dist/vite/plugins/utils/import-esm.d.ts.map +1 -0
- package/dist/vite/plugins/utils/import-esm.js +22 -0
- package/dist/vite/plugins/utils/import-esm.js.map +1 -0
- package/dist/vite/plugins/utils/index.d.ts +3 -0
- package/dist/vite/plugins/utils/index.d.ts.map +1 -0
- package/dist/vite/plugins/utils/index.js +21 -0
- package/dist/vite/plugins/utils/index.js.map +1 -0
- package/dist/webpack/configs/optimization-config.d.ts.map +1 -1
- package/dist/webpack/configs/optimization-config.js +53 -24
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.d.ts.map +1 -1
- package/dist/webpack/configs/output-config.js +0 -1
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +11 -3
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +2 -21
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-process-env-plugin.d.ts +5 -0
- package/dist/webpack/configs/plugins/define-process-env-plugin.d.ts.map +1 -0
- package/dist/webpack/configs/plugins/define-process-env-plugin.js +20 -0
- package/dist/webpack/configs/plugins/define-process-env-plugin.js.map +1 -0
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +1 -4
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/empty-module.d.ts +2 -0
- package/dist/webpack/configs/plugins/ignore-plugin/empty-module.d.ts.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/empty-module.js +11 -0
- package/dist/webpack/configs/plugins/ignore-plugin/empty-module.js.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts +26 -3
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +41 -10
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +1 -0
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +1 -0
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +2 -5
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +1 -0
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js +2 -1
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js +2 -1
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +8 -3
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/create-webpack-configs.d.ts.map +1 -1
- package/dist/webpack/create-webpack-configs.js +4 -12
- package/dist/webpack/create-webpack-configs.js.map +1 -1
- package/dist/webpack/types.d.ts +1 -1
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/utils/create-webpack-build-context.d.ts.map +1 -1
- package/dist/webpack/utils/create-webpack-build-context.js +1 -2
- package/dist/webpack/utils/create-webpack-build-context.js.map +1 -1
- package/package.json +22 -18
- package/src/cli/commands/__tests__/build.test.ts +33 -5
- package/src/cli/commands/__tests__/bundle-vite.test.ts +50 -1
- package/src/cli/commands/__tests__/start.test.ts +17 -4
- package/src/cli/commands/build.ts +5 -6
- package/src/cli/commands/bundle-vite.ts +13 -0
- package/src/cli/commands/registry/build.ts +6 -1
- package/src/cli/commands/registry/command-registry.ts +0 -1
- package/src/cli/commands/registry/start.ts +6 -1
- package/src/cli/commands/review/rules/__tests__/require-compatible-typescript.test.ts +127 -0
- package/src/cli/commands/review/rules/index.ts +2 -0
- package/src/cli/commands/review/rules/require-compatible-typescript.ts +64 -0
- package/src/cli/commands/start.ts +4 -4
- package/src/cli/commands/test/runners/__tests__/vitest.test.ts +8 -1
- package/src/cli/commands/test/runners/vitest.ts +5 -3
- package/src/cli/index.ts +2 -2
- package/src/cli/utils/__tests__/get-bundle-command.test.ts +23 -0
- package/src/cli/utils/__tests__/get-exit-code.test.ts +41 -0
- package/src/cli/utils/__tests__/resolve-bundler.test.ts +64 -0
- package/src/cli/utils/get-bundle-command.ts +5 -0
- package/src/cli/utils/get-exit-code.ts +17 -0
- package/src/cli/utils/index.ts +3 -0
- package/src/cli/utils/resolve-bundler.ts +23 -0
- package/src/core/__tests__/bundle-report.test.ts +60 -0
- package/src/core/__tests__/create-extension-regexp.test.ts +32 -0
- package/src/core/__tests__/resolve-output-path.test.ts +45 -0
- package/src/core/__tests__/resolve-output-root.test.ts +37 -0
- package/src/core/__tests__/sort-shared-css.test.ts +39 -0
- package/src/core/bundle-report.ts +33 -0
- package/src/core/check-resource/__tests__/check-resource.test.ts +21 -7
- package/src/core/check-resource/__tests__/get-peer-dependency-meta.test.ts +70 -13
- package/src/core/check-resource/__tests__/is-resolvable.test.ts +20 -0
- package/src/core/check-resource/check-resource.ts +17 -16
- package/src/core/check-resource/get-peer-dependency-meta.ts +67 -4
- package/src/core/check-resource/index.ts +1 -1
- package/src/core/check-resource/is-resolvable.ts +19 -0
- package/src/core/check-resource/types.ts +2 -0
- package/src/core/chunk-patterns.ts +30 -0
- package/src/core/create-build-context.ts +2 -2
- package/src/core/create-extension-regexp.ts +7 -0
- package/src/core/get-process-env.ts +17 -0
- package/src/core/index.ts +8 -1
- package/src/core/moment-locales.ts +6 -0
- package/src/core/resolve-output-path.ts +10 -0
- package/src/core/resolve-output-root.ts +8 -0
- package/src/core/sort-shared-css.ts +7 -0
- package/src/core/types.ts +1 -1
- package/src/cypress/config/__tests__/vite-config.test.ts +72 -0
- package/src/cypress/config/index.ts +1 -0
- package/src/cypress/config/vite-config.ts +37 -0
- package/src/jest/__tests__/resolver.test.ts +42 -1
- package/src/jest/resolver.ts +17 -1
- package/src/storybook-config/__tests__/vite-final.test.ts +122 -0
- package/src/storybook-config/index.ts +1 -0
- package/src/storybook-config/vite-final.ts +65 -0
- package/src/utils/__tests__/get-configuration.test.ts +82 -5
- package/src/utils/__tests__/get-package-name.test.ts +57 -0
- package/src/utils/__tests__/validate-shared-dependencies.test.ts +50 -35
- package/src/utils/get-configuration.ts +50 -15
- package/src/utils/get-package-name.ts +8 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/types.ts +1 -0
- package/src/utils/validate-shared-dependencies.ts +15 -1
- package/src/vite/__tests__/build-shared-dependencies.test.ts +13 -26
- package/src/vite/__tests__/validate-shared-dependencies.test.ts +30 -19
- package/src/vite/build-shared-dependencies.ts +3 -7
- package/src/vite/config/__tests__/asset-file-names.test.ts +40 -0
- package/src/vite/config/__tests__/base-config.test.ts +99 -31
- package/src/vite/config/__tests__/code-splitting.test.ts +34 -0
- package/src/vite/config/__tests__/create-css-config.test.ts +58 -0
- package/src/vite/config/__tests__/create-filtering-logger.test.ts +51 -0
- package/src/vite/config/__tests__/create-vite-build-context.test.ts +5 -2
- package/src/vite/config/__tests__/create-vite-config.test.ts +91 -13
- package/src/vite/config/__tests__/get-warmup-client-files.test.ts +20 -0
- package/src/vite/config/asset-file-names.ts +20 -0
- package/src/vite/config/base-config.ts +45 -37
- package/src/vite/config/code-splitting.ts +23 -0
- package/src/vite/config/create-css-config.ts +16 -0
- package/src/vite/config/create-filtering-logger.ts +34 -0
- package/src/vite/config/create-vite-build-context.ts +3 -5
- package/src/vite/config/create-vite-config.ts +45 -12
- package/src/vite/config/get-warmup-client-files.ts +13 -0
- package/src/vite/index.html +1 -0
- package/src/vite/plugins/__tests__/bundle-stat-plugin.test.ts +70 -0
- package/src/vite/plugins/__tests__/chain-source-maps-plugin.test.ts +58 -0
- package/src/vite/plugins/__tests__/clean-plugin.test.ts +121 -0
- package/src/vite/plugins/__tests__/design-system-guard-plugin.test.ts +83 -0
- package/src/vite/plugins/__tests__/html-template.test.ts +6 -0
- package/src/vite/plugins/__tests__/ignore-modules-plugin.test.ts +29 -7
- package/src/vite/plugins/__tests__/istanbul-plugin.test.ts +62 -0
- package/src/vite/plugins/__tests__/moment-locales-plugin.test.ts +104 -0
- package/src/vite/plugins/bundle-stat-plugin.ts +24 -0
- package/src/vite/plugins/chain-source-maps-plugin.ts +26 -0
- package/src/vite/plugins/clean-plugin.ts +46 -0
- package/src/vite/plugins/design-system-guard-plugin.ts +34 -0
- package/src/vite/plugins/ignore-modules-plugin.ts +36 -7
- package/src/vite/plugins/index.ts +7 -0
- package/src/vite/plugins/istanbul-plugin.ts +19 -0
- package/src/vite/plugins/magic-comments-plugin/__tests__/magic-comments-plugin.test.ts +105 -0
- package/src/vite/plugins/magic-comments-plugin/__tests__/parse-magic-comments.test.ts +40 -0
- package/src/vite/plugins/magic-comments-plugin/index.ts +1 -0
- package/src/vite/plugins/magic-comments-plugin/magic-comments-plugin.ts +63 -0
- package/src/vite/plugins/magic-comments-plugin/parse-magic-comments.ts +39 -0
- package/src/vite/plugins/metadata-plugin.ts +1 -1
- package/src/vite/plugins/moment-locales-plugin.ts +41 -0
- package/src/vite/plugins/shared-dependencies-plugin/__tests__/assemble-iife.test.ts +29 -0
- package/src/vite/plugins/shared-dependencies-plugin/__tests__/assert-no-dynamic-css.test.ts +113 -0
- package/src/vite/plugins/shared-dependencies-plugin/__tests__/flatten.test.ts +23 -0
- package/src/vite/plugins/{__tests__ → shared-dependencies-plugin/__tests__}/shared-dependencies-plugin.test.ts +38 -4
- package/src/vite/plugins/shared-dependencies-plugin/assemble-iife.ts +114 -0
- package/src/vite/plugins/shared-dependencies-plugin/assert-no-dynamic-css.ts +58 -0
- package/src/vite/plugins/shared-dependencies-plugin/flatten.ts +8 -0
- package/src/vite/plugins/shared-dependencies-plugin/index.ts +1 -0
- package/src/vite/plugins/{shared-dependencies-plugin.ts → shared-dependencies-plugin/shared-dependencies-plugin.ts} +24 -115
- package/src/vite/plugins/utils/import-esm.ts +15 -0
- package/src/vite/plugins/utils/index.ts +2 -0
- package/src/vite/rolldown-oxc.d.ts +20 -0
- package/src/webpack/__tests__/bundle-webpack.test.ts +8 -8
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +54 -5
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +81 -12
- package/src/webpack/__tests__/create-webpack-config.test.ts +92 -9
- package/src/webpack/configs/optimization-config.ts +47 -25
- package/src/webpack/configs/output-config.ts +1 -2
- package/src/webpack/configs/plugins/assets-manifest-plugin.ts +16 -4
- package/src/webpack/configs/plugins/bundle-analyser-plugin.ts +3 -25
- package/src/webpack/configs/plugins/define-process-env-plugin.ts +10 -0
- package/src/webpack/configs/plugins/filter-warnings-plugin.ts +1 -5
- package/src/webpack/configs/plugins/ignore-plugin/__tests__/ignore-plugin.test.ts +76 -24
- package/src/webpack/configs/plugins/ignore-plugin/empty-module.ts +7 -0
- package/src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts +59 -9
- package/src/webpack/configs/plugins/index.ts +1 -0
- package/src/webpack/configs/plugins/moment-locales-plugin.ts +2 -2
- package/src/webpack/configs/plugins-config.ts +2 -0
- package/src/webpack/configs/rules/font-rules.ts +2 -2
- package/src/webpack/configs/rules/image-rules.ts +2 -2
- package/src/webpack/create-webpack-config.ts +11 -4
- package/src/webpack/create-webpack-configs.ts +2 -8
- package/src/webpack/types.ts +1 -4
- package/src/webpack/utils/create-webpack-build-context.ts +1 -6
- package/tsconfig/base.json +1 -1
- package/tsconfig/types.d.ts +10 -0
- package/dist/core/get-output-path.d.ts +0 -3
- package/dist/core/get-output-path.d.ts.map +0 -1
- package/dist/core/get-output-path.js +0 -29
- package/dist/core/get-output-path.js.map +0 -1
- package/dist/vite/plugins/shared-dependencies-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/shared-dependencies-plugin.js.map +0 -1
- package/src/core/__tests__/get-output-path.test.ts +0 -64
- package/src/core/get-output-path.ts +0 -15
- /package/dist/vite/plugins/{shared-dependencies-plugin.d.ts → shared-dependencies-plugin/shared-dependencies-plugin.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/plugins/bundle-analyser-plugin.ts"],"sourcesContent":["import os from 'os';\nimport path from 'path';\nimport { BuildContext,
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/plugins/bundle-analyser-plugin.ts"],"sourcesContent":["import os from 'os';\nimport path from 'path';\nimport { BuildContext, bundleReportFileName, bundleReportTitle } from '../../../core';\nimport { Overrides } from '../../types';\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;\n\nexport function bundleAnalyzerPlugin(context: BuildContext, _: Overrides) {\n if (!context.options.buildStat) {\n return;\n }\n\n return new BundleAnalyzerPlugin({\n analyzerMode: 'static',\n reportFilename: path.join(os.tmpdir(), `${bundleReportFileName(context)}.html`),\n reportTitle: bundleReportTitle(context),\n });\n}\n"],"names":["bundleAnalyzerPlugin","BundleAnalyzerPlugin","require","context","_","options","buildStat","analyzerMode","reportFilename","path","join","os","tmpdir","bundleReportFileName","reportTitle","bundleReportTitle"],"mappings":";;;;+BAMgBA;;;eAAAA;;;2DAND;6DACE;sBACqD;;;;;;AAEtE,MAAMC,uBAAuBC,QAAQ,2BAA2BD,oBAAoB;AAE7E,SAASD,qBAAqBG,OAAqB,EAAEC,CAAY;IACpE,IAAI,CAACD,QAAQE,OAAO,CAACC,SAAS,EAAE;QAC5B;IACJ;IAEA,OAAO,IAAIL,qBAAqB;QAC5BM,cAAc;QACdC,gBAAgBC,aAAI,CAACC,IAAI,CAACC,WAAE,CAACC,MAAM,IAAI,GAAGC,IAAAA,0BAAoB,EAACV,SAAS,KAAK,CAAC;QAC9EW,aAAaC,IAAAA,uBAAiB,EAACZ;IACnC;AACJ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DefinePlugin } from 'webpack';
|
|
2
|
+
import { BuildContext } from '../../../core';
|
|
3
|
+
import { Overrides } from '../../types';
|
|
4
|
+
export declare function defineProcessEnvPlugin(context: BuildContext, _: Overrides): DefinePlugin | undefined;
|
|
5
|
+
//# sourceMappingURL=define-process-env-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-process-env-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/define-process-env-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAiB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,4BAKzE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "defineProcessEnvPlugin", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return defineProcessEnvPlugin;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _webpack = require("webpack");
|
|
12
|
+
const _core = require("../../../core");
|
|
13
|
+
function defineProcessEnvPlugin(context, _) {
|
|
14
|
+
const definitions = (0, _core.getProcessEnv)(context);
|
|
15
|
+
if (definitions) {
|
|
16
|
+
return new _webpack.DefinePlugin(definitions);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=define-process-env-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/plugins/define-process-env-plugin.ts"],"sourcesContent":["import { DefinePlugin } from 'webpack';\nimport { BuildContext, getProcessEnv } from '../../../core';\nimport { Overrides } from '../../types';\n\nexport function defineProcessEnvPlugin(context: BuildContext, _: Overrides) {\n const definitions = getProcessEnv(context);\n if (definitions) {\n return new DefinePlugin(definitions);\n }\n}\n"],"names":["defineProcessEnvPlugin","context","_","definitions","getProcessEnv","DefinePlugin"],"mappings":";;;;+BAIgBA;;;eAAAA;;;yBAJa;sBACe;AAGrC,SAASA,uBAAuBC,OAAqB,EAAEC,CAAY;IACtE,MAAMC,cAAcC,IAAAA,mBAAa,EAACH;IAClC,IAAIE,aAAa;QACb,OAAO,IAAIE,qBAAY,CAACF;IAC5B;AACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BuildContext } from '../../../core';
|
|
2
2
|
import { Overrides } from '../../types';
|
|
3
|
-
export declare function filterWarningsPlugin(
|
|
3
|
+
export declare function filterWarningsPlugin(_context: BuildContext, _: Overrides): any;
|
|
4
4
|
//# sourceMappingURL=filter-warnings-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-warnings-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/filter-warnings-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,wBAAgB,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"filter-warnings-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/filter-warnings-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,OAIxE"}
|
|
@@ -9,10 +9,7 @@ Object.defineProperty(exports, "filterWarningsPlugin", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
|
|
12
|
-
function filterWarningsPlugin(
|
|
13
|
-
if (context.build.light) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
12
|
+
function filterWarningsPlugin(_context, _) {
|
|
16
13
|
return new FilterWarningsPlugin({
|
|
17
14
|
exclude: /export .* was not found in/
|
|
18
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/plugins/filter-warnings-plugin.ts"],"sourcesContent":["const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');\nimport { BuildContext } from '../../../core';\nimport { Overrides } from '../../types';\n\nexport function filterWarningsPlugin(
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/plugins/filter-warnings-plugin.ts"],"sourcesContent":["const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');\nimport { BuildContext } from '../../../core';\nimport { Overrides } from '../../types';\n\nexport function filterWarningsPlugin(_context: BuildContext, _: Overrides) {\n return new FilterWarningsPlugin({\n exclude: /export .* was not found in/,\n });\n}\n"],"names":["filterWarningsPlugin","FilterWarningsPlugin","require","_context","_","exclude"],"mappings":";;;;+BAIgBA;;;eAAAA;;;AAJhB,MAAMC,uBAAuBC,QAAQ;AAI9B,SAASF,qBAAqBG,QAAsB,EAAEC,CAAY;IACrE,OAAO,IAAIH,qBAAqB;QAC5BI,SAAS;IACb;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-module.d.ts","sourceRoot":"","sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/empty-module.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Empty module used by IgnoreOptionalDependenciesPlugin in 'empty' mode to substitute missing
|
|
3
|
+
* optional dependencies. This must be a physical file because webpack's resolveData.request
|
|
4
|
+
* requires a resolvable path. Matches the vite plugin's substitute shape (no exports), so a
|
|
5
|
+
* namespace import (`import * as X`) yields an empty namespace under both bundlers.
|
|
6
|
+
*/ "use strict";
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=empty-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/empty-module.ts"],"sourcesContent":["/*\n * Empty module used by IgnoreOptionalDependenciesPlugin in 'empty' mode to substitute missing\n * optional dependencies. This must be a physical file because webpack's resolveData.request\n * requires a resolvable path. Matches the vite plugin's substitute shape (no exports), so a\n * namespace import (`import * as X`) yields an empty namespace under both bundlers.\n */\nexport {};\n"],"names":[],"mappings":"AAAA;;;;;CAKC"}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BuildContext } from '../../../../core';
|
|
1
|
+
import { Compiler } from 'webpack';
|
|
2
|
+
import { BuildContext, type CheckerArgs, type IgnoreMode } from '../../../../core';
|
|
3
3
|
import { Overrides } from '../../../types';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Handles optional peer dependencies that are not installed.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link file://./../../../../vite/plugins/ignore-modules-plugin.ts} for the vite counterpart.
|
|
8
|
+
*
|
|
9
|
+
* 'throw' mode: returns false from beforeResolve, mirroring webpack's built-in IgnorePlugin.
|
|
10
|
+
* Webpack emits a `webpackMissingModule()` IIFE that throws "Cannot find module" at runtime.
|
|
11
|
+
* Top-level static imports of the resource crash module evaluation, and `try { require(...) }
|
|
12
|
+
* catch {}` patterns work as expected. This is the default for matched optional peers.
|
|
13
|
+
*
|
|
14
|
+
* 'empty' mode: rewrites the request to point at an empty physical module so the import
|
|
15
|
+
* resolves successfully with no exports. Required for top-level `import * as X from 'optional'`
|
|
16
|
+
* followed by `X.foo === undefined` detection. Opt in via
|
|
17
|
+
* `cli.peerDependenciesMeta["pkg"].fallback = "empty"` in the importer's package.json.
|
|
18
|
+
*/
|
|
19
|
+
type Checker = (args: CheckerArgs) => IgnoreMode | false;
|
|
20
|
+
declare class IgnoreOptionalDependenciesPlugin {
|
|
21
|
+
private readonly checker;
|
|
22
|
+
private readonly emptyModulePath;
|
|
23
|
+
constructor(checker: Checker);
|
|
24
|
+
apply(compiler: Compiler): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function ignorePlugin(context: BuildContext, _: Overrides): IgnoreOptionalDependenciesPlugin;
|
|
27
|
+
export {};
|
|
5
28
|
//# sourceMappingURL=ignore-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignore-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ignore-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAiB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,UAAU,GAAG,KAAK,CAAC;AAEzD,cAAM,gCAAgC;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;gBAE7B,OAAO,EAAE,OAAO;IAK5B,KAAK,CAAC,QAAQ,EAAE,QAAQ;CA4B3B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,oCAE/D"}
|
|
@@ -8,18 +8,49 @@ Object.defineProperty(exports, "ignorePlugin", {
|
|
|
8
8
|
return ignorePlugin;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _webpack = require("webpack");
|
|
12
11
|
const _core = require("../../../../core");
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
class IgnoreOptionalDependenciesPlugin {
|
|
26
|
+
apply(compiler) {
|
|
27
|
+
compiler.hooks.normalModuleFactory.tap('IgnoreOptionalDependenciesPlugin', (normalModuleFactory)=>{
|
|
28
|
+
normalModuleFactory.hooks.beforeResolve.tap('IgnoreOptionalDependenciesPlugin', (resolveData)=>{
|
|
29
|
+
if (!resolveData) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const mode = this.checker({
|
|
33
|
+
resource: resolveData.request,
|
|
34
|
+
importer: resolveData.context
|
|
35
|
+
});
|
|
36
|
+
if (mode === 'throw') {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (mode === 'empty') {
|
|
40
|
+
resolveData.request = this.emptyModulePath; // must be a physical file
|
|
41
|
+
}
|
|
20
42
|
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
constructor(checker){
|
|
46
|
+
_define_property(this, "checker", void 0);
|
|
47
|
+
_define_property(this, "emptyModulePath", void 0);
|
|
48
|
+
this.checker = checker;
|
|
49
|
+
this.emptyModulePath = require.resolve('./empty-module');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function ignorePlugin(context, _) {
|
|
53
|
+
return new IgnoreOptionalDependenciesPlugin((0, _core.checkResource)(context));
|
|
23
54
|
}
|
|
24
55
|
|
|
25
56
|
//# sourceMappingURL=ignore-plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts"],"sourcesContent":["import { Compiler } from 'webpack';\nimport { BuildContext, type CheckerArgs, checkResource, type IgnoreMode } from '../../../../core';\nimport { Overrides } from '../../../types';\n\n/**\n * Handles optional peer dependencies that are not installed.\n *\n * @see {@link file://./../../../../vite/plugins/ignore-modules-plugin.ts} for the vite counterpart.\n *\n * 'throw' mode: returns false from beforeResolve, mirroring webpack's built-in IgnorePlugin.\n * Webpack emits a `webpackMissingModule()` IIFE that throws \"Cannot find module\" at runtime.\n * Top-level static imports of the resource crash module evaluation, and `try { require(...) }\n * catch {}` patterns work as expected. This is the default for matched optional peers.\n *\n * 'empty' mode: rewrites the request to point at an empty physical module so the import\n * resolves successfully with no exports. Required for top-level `import * as X from 'optional'`\n * followed by `X.foo === undefined` detection. Opt in via\n * `cli.peerDependenciesMeta[\"pkg\"].fallback = \"empty\"` in the importer's package.json.\n */\ntype Checker = (args: CheckerArgs) => IgnoreMode | false;\n\nclass IgnoreOptionalDependenciesPlugin {\n private readonly checker: Checker;\n private readonly emptyModulePath: string;\n\n constructor(checker: Checker) {\n this.checker = checker;\n this.emptyModulePath = require.resolve('./empty-module');\n }\n\n apply(compiler: Compiler) {\n compiler.hooks.normalModuleFactory.tap(\n 'IgnoreOptionalDependenciesPlugin',\n normalModuleFactory => {\n normalModuleFactory.hooks.beforeResolve.tap(\n 'IgnoreOptionalDependenciesPlugin',\n resolveData => {\n if (!resolveData) {\n return;\n }\n\n const mode = this.checker({\n resource: resolveData.request,\n importer: resolveData.context,\n });\n\n if (mode === 'throw') {\n return false;\n }\n\n if (mode === 'empty') {\n resolveData.request = this.emptyModulePath; // must be a physical file\n }\n }\n );\n }\n );\n }\n}\n\nexport function ignorePlugin(context: BuildContext, _: Overrides) {\n return new IgnoreOptionalDependenciesPlugin(checkResource(context));\n}\n"],"names":["ignorePlugin","IgnoreOptionalDependenciesPlugin","apply","compiler","hooks","normalModuleFactory","tap","beforeResolve","resolveData","mode","checker","resource","request","importer","context","emptyModulePath","require","resolve","_","checkResource"],"mappings":";;;;+BA4DgBA;;;eAAAA;;;sBA3D+D;;;;;;;;;;;;;;AAoB/E,MAAMC;IASFC,MAAMC,QAAkB,EAAE;QACtBA,SAASC,KAAK,CAACC,mBAAmB,CAACC,GAAG,CAClC,oCACAD,CAAAA;YACIA,oBAAoBD,KAAK,CAACG,aAAa,CAACD,GAAG,CACvC,oCACAE,CAAAA;gBACI,IAAI,CAACA,aAAa;oBACd;gBACJ;gBAEA,MAAMC,OAAO,IAAI,CAACC,OAAO,CAAC;oBACtBC,UAAUH,YAAYI,OAAO;oBAC7BC,UAAUL,YAAYM,OAAO;gBACjC;gBAEA,IAAIL,SAAS,SAAS;oBAClB,OAAO;gBACX;gBAEA,IAAIA,SAAS,SAAS;oBAClBD,YAAYI,OAAO,GAAG,IAAI,CAACG,eAAe,EAAE,0BAA0B;gBAC1E;YACJ;QAER;IAER;IAhCA,YAAYL,OAAgB,CAAE;QAH9B,uBAAiBA,WAAjB,KAAA;QACA,uBAAiBK,mBAAjB,KAAA;QAGI,IAAI,CAACL,OAAO,GAAGA;QACf,IAAI,CAACK,eAAe,GAAGC,QAAQC,OAAO,CAAC;IAC3C;AA8BJ;AAEO,SAASjB,aAAac,OAAqB,EAAEI,CAAY;IAC5D,OAAO,IAAIjB,iCAAiCkB,IAAAA,mBAAa,EAACL;AAC9D"}
|
|
@@ -2,6 +2,7 @@ export * from './assets-manifest-plugin';
|
|
|
2
2
|
export * from './bundle-analyser-plugin';
|
|
3
3
|
export * from './define-exposed-dependencies-plugin';
|
|
4
4
|
export * from './define-exposed-instance-dependencies-plugin';
|
|
5
|
+
export * from './define-process-env-plugin';
|
|
5
6
|
export * from './define-web-component-name-plugin';
|
|
6
7
|
export * from './filter-warnings-plugin';
|
|
7
8
|
export * from './html-plugin';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
@@ -6,6 +6,7 @@ _export_star(require("./assets-manifest-plugin"), exports);
|
|
|
6
6
|
_export_star(require("./bundle-analyser-plugin"), exports);
|
|
7
7
|
_export_star(require("./define-exposed-dependencies-plugin"), exports);
|
|
8
8
|
_export_star(require("./define-exposed-instance-dependencies-plugin"), exports);
|
|
9
|
+
_export_star(require("./define-process-env-plugin"), exports);
|
|
9
10
|
_export_star(require("./define-web-component-name-plugin"), exports);
|
|
10
11
|
_export_star(require("./filter-warnings-plugin"), exports);
|
|
11
12
|
_export_star(require("./html-plugin"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/plugins/index.ts"],"sourcesContent":["export * from './assets-manifest-plugin';\nexport * from './bundle-analyser-plugin';\nexport * from './define-exposed-dependencies-plugin';\nexport * from './define-exposed-instance-dependencies-plugin';\nexport * from './define-web-component-name-plugin';\nexport * from './filter-warnings-plugin';\nexport * from './html-plugin';\nexport * from './html-tags-plugin';\nexport * from './ignore-plugin';\nexport * from './mini-css-extract-plugin';\nexport * from './moment-locales-plugin';\nexport * from './remove-empty-scripts-plugin';\nexport * from './virtual-modules-plugin';\nexport * from './watch-run-plugin';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/plugins/index.ts"],"sourcesContent":["export * from './assets-manifest-plugin';\nexport * from './bundle-analyser-plugin';\nexport * from './define-exposed-dependencies-plugin';\nexport * from './define-exposed-instance-dependencies-plugin';\nexport * from './define-process-env-plugin';\nexport * from './define-web-component-name-plugin';\nexport * from './filter-warnings-plugin';\nexport * from './html-plugin';\nexport * from './html-tags-plugin';\nexport * from './ignore-plugin';\nexport * from './mini-css-extract-plugin';\nexport * from './moment-locales-plugin';\nexport * from './remove-empty-scripts-plugin';\nexport * from './virtual-modules-plugin';\nexport * from './watch-run-plugin';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moment-locales-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/moment-locales-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"moment-locales-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/moment-locales-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,uDAOzE"}
|
|
@@ -8,14 +8,11 @@ Object.defineProperty(exports, "momentLocalesPlugin", {
|
|
|
8
8
|
return momentLocalesPlugin;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _core = require("../../../core");
|
|
11
12
|
const MomentLocalesPlugin = isMomentInstalled() ? require('moment-locales-webpack-plugin') : undefined;
|
|
12
13
|
function momentLocalesPlugin(_, _overrides) {
|
|
13
14
|
return MomentLocalesPlugin && new MomentLocalesPlugin({
|
|
14
|
-
localesToKeep:
|
|
15
|
-
'en-au',
|
|
16
|
-
'en-ca',
|
|
17
|
-
'en-gb'
|
|
18
|
-
]
|
|
15
|
+
localesToKeep: _core.MOMENT_LOCALES
|
|
19
16
|
});
|
|
20
17
|
}
|
|
21
18
|
function isMomentInstalled() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/plugins/moment-locales-plugin.ts"],"sourcesContent":["import { BuildContext } from '../../../core';\nimport { Overrides } from '../../types';\n\nconst MomentLocalesPlugin: typeof import('moment-locales-webpack-plugin') | undefined =\n isMomentInstalled() ? require('moment-locales-webpack-plugin') : undefined;\n\nexport function momentLocalesPlugin(_: BuildContext, _overrides: Overrides) {\n return (\n MomentLocalesPlugin &&\n new MomentLocalesPlugin({\n localesToKeep:
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/plugins/moment-locales-plugin.ts"],"sourcesContent":["import { BuildContext, MOMENT_LOCALES } from '../../../core';\nimport { Overrides } from '../../types';\n\nconst MomentLocalesPlugin: typeof import('moment-locales-webpack-plugin') | undefined =\n isMomentInstalled() ? require('moment-locales-webpack-plugin') : undefined;\n\nexport function momentLocalesPlugin(_: BuildContext, _overrides: Overrides) {\n return (\n MomentLocalesPlugin &&\n new MomentLocalesPlugin({\n localesToKeep: MOMENT_LOCALES,\n })\n );\n}\n\nfunction isMomentInstalled() {\n try {\n return !!require.resolve('moment');\n } catch {\n return false;\n }\n}\n"],"names":["momentLocalesPlugin","MomentLocalesPlugin","isMomentInstalled","require","undefined","_","_overrides","localesToKeep","MOMENT_LOCALES","resolve"],"mappings":";;;;+BAMgBA;;;eAAAA;;;sBAN6B;AAG7C,MAAMC,sBACFC,sBAAsBC,QAAQ,mCAAmCC;AAE9D,SAASJ,oBAAoBK,CAAe,EAAEC,UAAqB;IACtE,OACIL,uBACA,IAAIA,oBAAoB;QACpBM,eAAeC,oBAAc;IACjC;AAER;AAEA,SAASN;IACL,IAAI;QACA,OAAO,CAAC,CAACC,QAAQM,OAAO,CAAC;IAC7B,EAAE,eAAM;QACJ,OAAO;IACX;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-config.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"plugins-config.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAoBrC,KAAK,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAE7C,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAsBjF"}
|
|
@@ -15,6 +15,7 @@ function pluginsConfig(context, overrides) {
|
|
|
15
15
|
_plugins.bundleAnalyzerPlugin,
|
|
16
16
|
_plugins.defineExposedDependenciesPlugin,
|
|
17
17
|
_plugins.defineExposedInstanceDependenciesPlugin,
|
|
18
|
+
_plugins.defineProcessEnvPlugin,
|
|
18
19
|
_plugins.defineWebComponentNamePlugin,
|
|
19
20
|
_plugins.filterWarningsPlugin,
|
|
20
21
|
_plugins.htmlPlugin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/webpack/configs/plugins-config.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { BuildContext } from '../../core';\nimport { Overrides } from '../types';\nimport {\n assetsManifestPlugin,\n bundleAnalyzerPlugin,\n defineExposedDependenciesPlugin,\n defineExposedInstanceDependenciesPlugin,\n defineWebComponentNamePlugin,\n filterWarningsPlugin,\n htmlPlugin,\n htmlTagsPlugin,\n ignorePlugin,\n miniCssExtractPlugin,\n momentLocalesPlugin,\n removeEmptyScriptsPlugin,\n virtualModulesPlugin,\n watchRunPlugin,\n} from './plugins';\n\ntype Config = Configuration['plugins'];\ntype Result = Pick<Configuration, 'plugins'>;\n\nexport function pluginsConfig(context: BuildContext, overrides: Overrides): Result {\n const plugins: Config = [\n assetsManifestPlugin,\n bundleAnalyzerPlugin,\n defineExposedDependenciesPlugin,\n defineExposedInstanceDependenciesPlugin,\n defineWebComponentNamePlugin,\n filterWarningsPlugin,\n htmlPlugin,\n htmlTagsPlugin,\n ignorePlugin,\n miniCssExtractPlugin,\n momentLocalesPlugin,\n removeEmptyScriptsPlugin,\n virtualModulesPlugin,\n watchRunPlugin,\n ]\n .map(fn => fn(context, overrides))\n .filter(plugin => !!plugin);\n\n return { plugins };\n}\n"],"names":["pluginsConfig","context","overrides","plugins","assetsManifestPlugin","bundleAnalyzerPlugin","defineExposedDependenciesPlugin","defineExposedInstanceDependenciesPlugin","defineWebComponentNamePlugin","filterWarningsPlugin","htmlPlugin","htmlTagsPlugin","ignorePlugin","miniCssExtractPlugin","momentLocalesPlugin","removeEmptyScriptsPlugin","virtualModulesPlugin","watchRunPlugin","map","fn","filter","plugin"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/configs/plugins-config.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { BuildContext } from '../../core';\nimport { Overrides } from '../types';\nimport {\n assetsManifestPlugin,\n bundleAnalyzerPlugin,\n defineExposedDependenciesPlugin,\n defineExposedInstanceDependenciesPlugin,\n defineProcessEnvPlugin,\n defineWebComponentNamePlugin,\n filterWarningsPlugin,\n htmlPlugin,\n htmlTagsPlugin,\n ignorePlugin,\n miniCssExtractPlugin,\n momentLocalesPlugin,\n removeEmptyScriptsPlugin,\n virtualModulesPlugin,\n watchRunPlugin,\n} from './plugins';\n\ntype Config = Configuration['plugins'];\ntype Result = Pick<Configuration, 'plugins'>;\n\nexport function pluginsConfig(context: BuildContext, overrides: Overrides): Result {\n const plugins: Config = [\n assetsManifestPlugin,\n bundleAnalyzerPlugin,\n defineExposedDependenciesPlugin,\n defineExposedInstanceDependenciesPlugin,\n defineProcessEnvPlugin,\n defineWebComponentNamePlugin,\n filterWarningsPlugin,\n htmlPlugin,\n htmlTagsPlugin,\n ignorePlugin,\n miniCssExtractPlugin,\n momentLocalesPlugin,\n removeEmptyScriptsPlugin,\n virtualModulesPlugin,\n watchRunPlugin,\n ]\n .map(fn => fn(context, overrides))\n .filter(plugin => !!plugin);\n\n return { plugins };\n}\n"],"names":["pluginsConfig","context","overrides","plugins","assetsManifestPlugin","bundleAnalyzerPlugin","defineExposedDependenciesPlugin","defineExposedInstanceDependenciesPlugin","defineProcessEnvPlugin","defineWebComponentNamePlugin","filterWarningsPlugin","htmlPlugin","htmlTagsPlugin","ignorePlugin","miniCssExtractPlugin","momentLocalesPlugin","removeEmptyScriptsPlugin","virtualModulesPlugin","watchRunPlugin","map","fn","filter","plugin"],"mappings":";;;;+BAwBgBA;;;eAAAA;;;yBALT;AAKA,SAASA,cAAcC,OAAqB,EAAEC,SAAoB;IACrE,MAAMC,UAAkB;QACpBC,6BAAoB;QACpBC,6BAAoB;QACpBC,wCAA+B;QAC/BC,gDAAuC;QACvCC,+BAAsB;QACtBC,qCAA4B;QAC5BC,6BAAoB;QACpBC,mBAAU;QACVC,uBAAc;QACdC,qBAAY;QACZC,6BAAoB;QACpBC,4BAAmB;QACnBC,iCAAwB;QACxBC,6BAAoB;QACpBC,uBAAc;KACjB,CACIC,GAAG,CAACC,CAAAA,KAAMA,GAAGnB,SAASC,YACtBmB,MAAM,CAACC,CAAAA,SAAU,CAAC,CAACA;IAExB,OAAO;QAAEnB;IAAQ;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font-rules.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/rules/font-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"font-rules.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/rules/font-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAA0C,MAAM,eAAe,CAAC;AAErF,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,GAAG,WAAW,EAAE,CAUxD"}
|
|
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "fontRules", {
|
|
|
8
8
|
return fontRules;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _core = require("../../../core");
|
|
11
12
|
function fontRules(_) {
|
|
12
13
|
return [
|
|
13
14
|
{
|
|
14
|
-
test:
|
|
15
|
+
test: (0, _core.createExtensionRegExp)(_core.FONT_EXTENSIONS),
|
|
15
16
|
type: 'asset/resource',
|
|
16
17
|
generator: {
|
|
17
18
|
filename: 'fonts/[contenthash][ext][query]'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/rules/font-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { BuildContext } from '../../../core';\n\nexport function fontRules(_: BuildContext): RuleSetRule[] {\n return [\n {\n test:
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/rules/font-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { BuildContext, FONT_EXTENSIONS, createExtensionRegExp } from '../../../core';\n\nexport function fontRules(_: BuildContext): RuleSetRule[] {\n return [\n {\n test: createExtensionRegExp(FONT_EXTENSIONS),\n type: 'asset/resource',\n generator: {\n filename: 'fonts/[contenthash][ext][query]',\n },\n },\n ];\n}\n"],"names":["fontRules","_","test","createExtensionRegExp","FONT_EXTENSIONS","type","generator","filename"],"mappings":";;;;+BAGgBA;;;eAAAA;;;sBAFqD;AAE9D,SAASA,UAAUC,CAAe;IACrC,OAAO;QACH;YACIC,MAAMC,IAAAA,2BAAqB,EAACC,qBAAe;YAC3CC,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;KACH;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-rules.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/rules/image-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"image-rules.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/rules/image-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAA2C,MAAM,eAAe,CAAC;AAEtF,wBAAgB,UAAU,CAAC,CAAC,EAAE,YAAY,GAAG,WAAW,EAAE,CAUzD"}
|
|
@@ -8,10 +8,11 @@ Object.defineProperty(exports, "imageRules", {
|
|
|
8
8
|
return imageRules;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _core = require("../../../core");
|
|
11
12
|
function imageRules(_) {
|
|
12
13
|
return [
|
|
13
14
|
{
|
|
14
|
-
test:
|
|
15
|
+
test: (0, _core.createExtensionRegExp)(_core.IMAGE_EXTENSIONS),
|
|
15
16
|
type: 'asset',
|
|
16
17
|
generator: {
|
|
17
18
|
filename: 'images/[contenthash][ext][query]'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/webpack/configs/rules/image-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { BuildContext } from '../../../core';\n\nexport function imageRules(_: BuildContext): RuleSetRule[] {\n return [\n {\n test:
|
|
1
|
+
{"version":3,"sources":["../../../../src/webpack/configs/rules/image-rules.ts"],"sourcesContent":["import { RuleSetRule } from 'webpack';\nimport { BuildContext, IMAGE_EXTENSIONS, createExtensionRegExp } from '../../../core';\n\nexport function imageRules(_: BuildContext): RuleSetRule[] {\n return [\n {\n test: createExtensionRegExp(IMAGE_EXTENSIONS),\n type: 'asset',\n generator: {\n filename: 'images/[contenthash][ext][query]',\n },\n },\n ];\n}\n"],"names":["imageRules","_","test","createExtensionRegExp","IMAGE_EXTENSIONS","type","generator","filename"],"mappings":";;;;+BAGgBA;;;eAAAA;;;sBAFsD;AAE/D,SAASA,WAAWC,CAAe;IACtC,OAAO;QACH;YACIC,MAAMC,IAAAA,2BAAqB,EAACC,sBAAgB;YAC5CC,MAAM;YACNC,WAAW;gBACPC,UAAU;YACd;QACJ;KACH;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-webpack-config.d.ts","sourceRoot":"","sources":["../../src/webpack/create-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmBxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAChE,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,GAAE,OAAY,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"create-webpack-config.d.ts","sourceRoot":"","sources":["../../src/webpack/create-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmBxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAChE,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,GAAE,OAAY,GAAG,aAAa,CAoD9F"}
|
|
@@ -28,14 +28,13 @@ const webpackDevConfigFileName = 'webpack.dev.config.js';
|
|
|
28
28
|
const webpackProdConfigFileName = 'webpack.prod.config.js';
|
|
29
29
|
function createWebpackConfig(overrides, options = {}) {
|
|
30
30
|
var _options_name, _overrides_configuration;
|
|
31
|
-
var _overrides_configuration1;
|
|
31
|
+
var _overrides_configuration1, _merged_output;
|
|
32
32
|
const context = (0, _utils1.createWebpackBuildContext)({
|
|
33
33
|
name: (_options_name = options.name) !== null && _options_name !== void 0 ? _options_name : '',
|
|
34
34
|
isProduction: ((_overrides_configuration1 = overrides.configuration) === null || _overrides_configuration1 === void 0 ? void 0 : _overrides_configuration1.mode) !== 'development',
|
|
35
35
|
light: options.light,
|
|
36
36
|
headless: options.headless,
|
|
37
37
|
emitExposedDependencies: options.emitExposedDependencies,
|
|
38
|
-
outputBasePath: options.outputBasePath,
|
|
39
38
|
codeCoverage: options.codeCoverage,
|
|
40
39
|
buildStat: options.buildStat
|
|
41
40
|
});
|
|
@@ -60,10 +59,16 @@ function createWebpackConfig(overrides, options = {}) {
|
|
|
60
59
|
_configs.statsConfig,
|
|
61
60
|
_configs.watchOptionsConfig
|
|
62
61
|
];
|
|
63
|
-
const
|
|
62
|
+
const merged = (0, _webpackmerge.merge)(configs.reduce((result, fn)=>({
|
|
64
63
|
...result,
|
|
65
64
|
...fn(context, overrides)
|
|
66
65
|
}), {}), (_overrides_configuration = overrides.configuration) !== null && _overrides_configuration !== void 0 ? _overrides_configuration : {});
|
|
66
|
+
// Resolve the output path: web components force the default, hosts honor a configured path.
|
|
67
|
+
const result = (0, _webpackmerge.merge)(merged, {
|
|
68
|
+
output: {
|
|
69
|
+
path: (0, _core.resolveOutputPath)(context, (_merged_output = merged.output) === null || _merged_output === void 0 ? void 0 : _merged_output.path)
|
|
70
|
+
}
|
|
71
|
+
});
|
|
67
72
|
/* istanbul ignore next: debug only */ _utils.log.debug('create-webpack-config', ()=>(0, _core.stringifyConfig)(result));
|
|
68
73
|
return result;
|
|
69
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack/create-webpack-config.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { merge } from 'webpack-merge';\nimport { stringifyConfig } from '../core';\nimport { log } from '../utils';\nimport {\n amdConfig,\n cacheConfig,\n devServerConfig,\n devtoolConfig,\n entryConfig,\n externalsConfig,\n moduleConfig,\n optimizationConfig,\n outputConfig,\n pluginsConfig,\n resolveConfig,\n statsConfig,\n watchOptionsConfig,\n} from './configs';\nimport { Options, Overrides } from './types';\nimport { createWebpackBuildContext, getCallerFile } from './utils';\n\nexport const webpackDevConfigFileName = 'webpack.dev.config.js';\nexport const webpackProdConfigFileName = 'webpack.prod.config.js';\n\nexport function createWebpackConfig(overrides: Overrides, options: Options = {}): Configuration {\n const context = createWebpackBuildContext({\n name: options.name ?? '',\n isProduction: overrides.configuration?.mode !== 'development',\n light: options.light,\n headless: options.headless,\n emitExposedDependencies: options.emitExposedDependencies,\n
|
|
1
|
+
{"version":3,"sources":["../../src/webpack/create-webpack-config.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { merge } from 'webpack-merge';\nimport { resolveOutputPath, stringifyConfig } from '../core';\nimport { log } from '../utils';\nimport {\n amdConfig,\n cacheConfig,\n devServerConfig,\n devtoolConfig,\n entryConfig,\n externalsConfig,\n moduleConfig,\n optimizationConfig,\n outputConfig,\n pluginsConfig,\n resolveConfig,\n statsConfig,\n watchOptionsConfig,\n} from './configs';\nimport { Options, Overrides } from './types';\nimport { createWebpackBuildContext, getCallerFile } from './utils';\n\nexport const webpackDevConfigFileName = 'webpack.dev.config.js';\nexport const webpackProdConfigFileName = 'webpack.prod.config.js';\n\nexport function createWebpackConfig(overrides: Overrides, options: Options = {}): Configuration {\n const context = createWebpackBuildContext({\n name: options.name ?? '',\n isProduction: overrides.configuration?.mode !== 'development',\n light: options.light,\n headless: options.headless,\n emitExposedDependencies: options.emitExposedDependencies,\n codeCoverage: options.codeCoverage,\n buildStat: options.buildStat,\n });\n\n if (context.package.isWebComponent && isCalledFromCustomWebpackConfigFile()) {\n throw new Error(WEB_COMPONENT_CONFIG_ERROR);\n }\n\n if (options.emitExposedDependencies && !context.package.isExposeSharedDependencies) {\n throw new Error('package does not expose shared dependencies');\n }\n\n const configs = [\n amdConfig,\n cacheConfig,\n devServerConfig,\n devtoolConfig,\n entryConfig,\n externalsConfig,\n moduleConfig,\n optimizationConfig,\n outputConfig,\n pluginsConfig,\n resolveConfig,\n statsConfig,\n watchOptionsConfig,\n ];\n\n const merged = merge(\n configs.reduce<Configuration>(\n (result, fn) => ({ ...result, ...fn(context, overrides) }),\n {}\n ),\n overrides.configuration ?? {}\n );\n\n // Resolve the output path: web components force the default, hosts honor a configured path.\n const result = merge(merged, {\n output: { path: resolveOutputPath(context, merged.output?.path) },\n });\n\n /* istanbul ignore next: debug only */\n log.debug('create-webpack-config', () => stringifyConfig(result));\n\n return result;\n}\n\nfunction isCalledFromCustomWebpackConfigFile() {\n const callerFileName = getCallerFile();\n return [webpackDevConfigFileName, webpackProdConfigFileName].some(configFileName =>\n callerFileName.includes(configFileName)\n );\n}\n\nconst WEB_COMPONENT_CONFIG_ERROR = `\n You cannot call createWebpackConfig in a custom webpack config file in a web component (MFE) project.\n Export webpack configuration itself as a default export from the config file instead.\n`\n .replace(/\\n\\s*/g, ' ')\n .trim();\n"],"names":["createWebpackConfig","webpackDevConfigFileName","webpackProdConfigFileName","overrides","options","merged","context","createWebpackBuildContext","name","isProduction","configuration","mode","light","headless","emitExposedDependencies","codeCoverage","buildStat","package","isWebComponent","isCalledFromCustomWebpackConfigFile","Error","WEB_COMPONENT_CONFIG_ERROR","isExposeSharedDependencies","configs","amdConfig","cacheConfig","devServerConfig","devtoolConfig","entryConfig","externalsConfig","moduleConfig","optimizationConfig","outputConfig","pluginsConfig","resolveConfig","statsConfig","watchOptionsConfig","merge","reduce","result","fn","output","path","resolveOutputPath","log","debug","stringifyConfig","callerFileName","getCallerFile","some","configFileName","includes","replace","trim"],"mappings":";;;;;;;;;;;QAyBgBA;eAAAA;;QAHHC;eAAAA;;QACAC;eAAAA;;;8BAtBS;sBAC6B;uBAC/B;yBAeb;wBAEkD;AAElD,MAAMD,2BAA2B;AACjC,MAAMC,4BAA4B;AAElC,SAASF,oBAAoBG,SAAoB,EAAEC,UAAmB,CAAC,CAAC;QAEjEA,eAsCND;QArCcA,2BA0C6BE;IA5C/C,MAAMC,UAAUC,IAAAA,iCAAyB,EAAC;QACtCC,IAAI,GAAEJ,gBAAAA,QAAQI,IAAI,cAAZJ,2BAAAA,gBAAgB;QACtBK,cAAcN,EAAAA,4BAAAA,UAAUO,aAAa,cAAvBP,gDAAAA,0BAAyBQ,IAAI,MAAK;QAChDC,OAAOR,QAAQQ,KAAK;QACpBC,UAAUT,QAAQS,QAAQ;QAC1BC,yBAAyBV,QAAQU,uBAAuB;QACxDC,cAAcX,QAAQW,YAAY;QAClCC,WAAWZ,QAAQY,SAAS;IAChC;IAEA,IAAIV,QAAQW,OAAO,CAACC,cAAc,IAAIC,uCAAuC;QACzE,MAAM,IAAIC,MAAMC;IACpB;IAEA,IAAIjB,QAAQU,uBAAuB,IAAI,CAACR,QAAQW,OAAO,CAACK,0BAA0B,EAAE;QAChF,MAAM,IAAIF,MAAM;IACpB;IAEA,MAAMG,UAAU;QACZC,kBAAS;QACTC,oBAAW;QACXC,wBAAe;QACfC,sBAAa;QACbC,oBAAW;QACXC,wBAAe;QACfC,qBAAY;QACZC,2BAAkB;QAClBC,qBAAY;QACZC,sBAAa;QACbC,sBAAa;QACbC,oBAAW;QACXC,2BAAkB;KACrB;IAED,MAAM/B,SAASgC,IAAAA,mBAAK,EAChBd,QAAQe,MAAM,CACV,CAACC,QAAQC,KAAQ,CAAA;YAAE,GAAGD,MAAM;YAAE,GAAGC,GAAGlC,SAASH,UAAU;QAAC,CAAA,GACxD,CAAC,KAELA,2BAAAA,UAAUO,aAAa,cAAvBP,sCAAAA,2BAA2B,CAAC;IAGhC,4FAA4F;IAC5F,MAAMoC,SAASF,IAAAA,mBAAK,EAAChC,QAAQ;QACzBoC,QAAQ;YAAEC,MAAMC,IAAAA,uBAAiB,EAACrC,UAASD,iBAAAA,OAAOoC,MAAM,cAAbpC,qCAAAA,eAAeqC,IAAI;QAAE;IACpE;IAEA,oCAAoC,GACpCE,UAAG,CAACC,KAAK,CAAC,yBAAyB,IAAMC,IAAAA,qBAAe,EAACP;IAEzD,OAAOA;AACX;AAEA,SAASpB;IACL,MAAM4B,iBAAiBC,IAAAA,qBAAa;IACpC,OAAO;QAAC/C;QAA0BC;KAA0B,CAAC+C,IAAI,CAACC,CAAAA,iBAC9DH,eAAeI,QAAQ,CAACD;AAEhC;AAEA,MAAM7B,6BAA6B,CAAC;;;AAGpC,CAAC,CACI+B,OAAO,CAAC,UAAU,KAClBC,IAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-webpack-configs.d.ts","sourceRoot":"","sources":["../../src/webpack/create-webpack-configs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAUxC,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"create-webpack-configs.d.ts","sourceRoot":"","sources":["../../src/webpack/create-webpack-configs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAUxC,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAyCjB"}
|
|
@@ -19,7 +19,6 @@ function _interop_require_default(obj) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
function createWebpackConfigs(options) {
|
|
22
|
-
var _customConfig_output;
|
|
23
22
|
const { watch, useWatchConfig } = options;
|
|
24
23
|
const mode = watch || useWatchConfig ? 'development' : 'production';
|
|
25
24
|
const fallback = watch || useWatchConfig ? _createwebpackconfig.webpackDevConfigFileName : _createwebpackconfig.webpackProdConfigFileName;
|
|
@@ -59,20 +58,13 @@ function createWebpackConfigs(options) {
|
|
|
59
58
|
full: customConfig
|
|
60
59
|
};
|
|
61
60
|
}
|
|
62
|
-
|
|
63
|
-
* outputBasePath is wired only here, for the shared-deps build. MFE main
|
|
64
|
-
* bundles (handled above) must publish under <package>/dist/bundle/<subdir>,
|
|
65
|
-
* so a custom output.path from the user's webpack config is not honored
|
|
66
|
-
* for them.
|
|
67
|
-
*/ return {
|
|
61
|
+
return {
|
|
68
62
|
full: (0, _createwebpackconfig.createWebpackConfig)({
|
|
69
63
|
configuration: {
|
|
70
|
-
mode
|
|
64
|
+
mode,
|
|
65
|
+
output: customConfig === null || customConfig === void 0 ? void 0 : customConfig.output
|
|
71
66
|
}
|
|
72
|
-
},
|
|
73
|
-
...resolved,
|
|
74
|
-
outputBasePath: customConfig === null || customConfig === void 0 ? void 0 : (_customConfig_output = customConfig.output) === null || _customConfig_output === void 0 ? void 0 : _customConfig_output.path
|
|
75
|
-
})
|
|
67
|
+
}, resolved)
|
|
76
68
|
};
|
|
77
69
|
}
|
|
78
70
|
function readWebpackConfig({ config, fallback }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack/create-webpack-configs.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { Configuration } from 'webpack';\nimport { getBuildName, stringifyConfig } from '../core';\nimport { hasHeadlessBundle, isWebComponent, log } from '../utils';\nimport {\n createWebpackConfig,\n webpackDevConfigFileName,\n webpackProdConfigFileName,\n} from './create-webpack-config';\nimport { Options, Overrides } from './types';\n\ninterface WebpackConfigs {\n full: Configuration;\n light?: Configuration;\n headless?: Configuration;\n}\n\nexport function createWebpackConfigs(options: {\n buildStat?: boolean;\n codeCoverage?: boolean;\n config?: string;\n emitExposedDependencies?: boolean;\n useWatchConfig?: boolean;\n watch?: boolean;\n}): WebpackConfigs {\n const { watch, useWatchConfig } = options;\n const mode = watch || useWatchConfig ? 'development' : 'production';\n const fallback = watch || useWatchConfig ? webpackDevConfigFileName : webpackProdConfigFileName;\n const customConfig = readWebpackConfig({ config: options.config, fallback });\n\n /* istanbul ignore next: debug only */\n log.debug('custom-webpack-config', () => stringifyConfig(customConfig));\n\n const resolved: Options = {\n buildStat: options.buildStat,\n codeCoverage: options.codeCoverage,\n emitExposedDependencies: options.emitExposedDependencies,\n name: getBuildName(),\n };\n\n if (isWebComponent()) {\n const overrides: Overrides = {\n configuration: { ...customConfig?.configuration, mode },\n plugins: customConfig?.plugins,\n };\n\n return {\n full: createWebpackConfig(overrides, resolved),\n light: createWebpackConfig(overrides, { ...resolved, light: true }),\n headless: hasHeadlessBundle()\n ? createWebpackConfig(overrides, { ...resolved, headless: true })\n : undefined,\n };\n }\n\n if (customConfig && !options.emitExposedDependencies) {\n return { full: customConfig };\n }\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/webpack/create-webpack-configs.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport { Configuration } from 'webpack';\nimport { getBuildName, stringifyConfig } from '../core';\nimport { hasHeadlessBundle, isWebComponent, log } from '../utils';\nimport {\n createWebpackConfig,\n webpackDevConfigFileName,\n webpackProdConfigFileName,\n} from './create-webpack-config';\nimport { Options, Overrides } from './types';\n\ninterface WebpackConfigs {\n full: Configuration;\n light?: Configuration;\n headless?: Configuration;\n}\n\nexport function createWebpackConfigs(options: {\n buildStat?: boolean;\n codeCoverage?: boolean;\n config?: string;\n emitExposedDependencies?: boolean;\n useWatchConfig?: boolean;\n watch?: boolean;\n}): WebpackConfigs {\n const { watch, useWatchConfig } = options;\n const mode = watch || useWatchConfig ? 'development' : 'production';\n const fallback = watch || useWatchConfig ? webpackDevConfigFileName : webpackProdConfigFileName;\n const customConfig = readWebpackConfig({ config: options.config, fallback });\n\n /* istanbul ignore next: debug only */\n log.debug('custom-webpack-config', () => stringifyConfig(customConfig));\n\n const resolved: Options = {\n buildStat: options.buildStat,\n codeCoverage: options.codeCoverage,\n emitExposedDependencies: options.emitExposedDependencies,\n name: getBuildName(),\n };\n\n if (isWebComponent()) {\n const overrides: Overrides = {\n configuration: { ...customConfig?.configuration, mode },\n plugins: customConfig?.plugins,\n };\n\n return {\n full: createWebpackConfig(overrides, resolved),\n light: createWebpackConfig(overrides, { ...resolved, light: true }),\n headless: hasHeadlessBundle()\n ? createWebpackConfig(overrides, { ...resolved, headless: true })\n : undefined,\n };\n }\n\n if (customConfig && !options.emitExposedDependencies) {\n return { full: customConfig };\n }\n\n return {\n full: createWebpackConfig(\n { configuration: { mode, output: customConfig?.output } },\n resolved\n ),\n };\n}\n\nfunction readWebpackConfig({ config, fallback }: { config?: string; fallback: string }) {\n return readConfig(config) ?? readConfig(fallback);\n}\n\nfunction readConfig(relativePath?: string): Record<string, any> | undefined {\n if (relativePath && fs.existsSync(relativePath)) {\n return require(path.resolve(relativePath));\n }\n}\n"],"names":["createWebpackConfigs","options","watch","useWatchConfig","mode","fallback","webpackDevConfigFileName","webpackProdConfigFileName","customConfig","readWebpackConfig","config","log","debug","stringifyConfig","resolved","buildStat","codeCoverage","emitExposedDependencies","name","getBuildName","isWebComponent","overrides","configuration","plugins","full","createWebpackConfig","light","headless","hasHeadlessBundle","undefined","output","readConfig","relativePath","fs","existsSync","require","path","resolve"],"mappings":";;;;+BAkBgBA;;;eAAAA;;;2DAlBD;6DACE;sBAE6B;uBACS;qCAKhD;;;;;;AASA,SAASA,qBAAqBC,OAOpC;IACG,MAAM,EAAEC,KAAK,EAAEC,cAAc,EAAE,GAAGF;IAClC,MAAMG,OAAOF,SAASC,iBAAiB,gBAAgB;IACvD,MAAME,WAAWH,SAASC,iBAAiBG,6CAAwB,GAAGC,8CAAyB;IAC/F,MAAMC,eAAeC,kBAAkB;QAAEC,QAAQT,QAAQS,MAAM;QAAEL;IAAS;IAE1E,oCAAoC,GACpCM,UAAG,CAACC,KAAK,CAAC,yBAAyB,IAAMC,IAAAA,qBAAe,EAACL;IAEzD,MAAMM,WAAoB;QACtBC,WAAWd,QAAQc,SAAS;QAC5BC,cAAcf,QAAQe,YAAY;QAClCC,yBAAyBhB,QAAQgB,uBAAuB;QACxDC,MAAMC,IAAAA,kBAAY;IACtB;IAEA,IAAIC,IAAAA,qBAAc,KAAI;QAClB,MAAMC,YAAuB;YACzBC,eAAe;mBAAKd,yBAAAA,mCAAAA,aAAcc,aAAa,AAA9B;gBAAgClB;YAAK;YACtDmB,OAAO,EAAEf,yBAAAA,mCAAAA,aAAce,OAAO;QAClC;QAEA,OAAO;YACHC,MAAMC,IAAAA,wCAAmB,EAACJ,WAAWP;YACrCY,OAAOD,IAAAA,wCAAmB,EAACJ,WAAW;gBAAE,GAAGP,QAAQ;gBAAEY,OAAO;YAAK;YACjEC,UAAUC,IAAAA,wBAAiB,MACrBH,IAAAA,wCAAmB,EAACJ,WAAW;gBAAE,GAAGP,QAAQ;gBAAEa,UAAU;YAAK,KAC7DE;QACV;IACJ;IAEA,IAAIrB,gBAAgB,CAACP,QAAQgB,uBAAuB,EAAE;QAClD,OAAO;YAAEO,MAAMhB;QAAa;IAChC;IAEA,OAAO;QACHgB,MAAMC,IAAAA,wCAAmB,EACrB;YAAEH,eAAe;gBAAElB;gBAAM0B,MAAM,EAAEtB,yBAAAA,mCAAAA,aAAcsB,MAAM;YAAC;QAAE,GACxDhB;IAER;AACJ;AAEA,SAASL,kBAAkB,EAAEC,MAAM,EAAEL,QAAQ,EAAyC;QAC3E0B;IAAP,QAAOA,cAAAA,WAAWrB,qBAAXqB,yBAAAA,cAAsBA,WAAW1B;AAC5C;AAEA,SAAS0B,WAAWC,YAAqB;IACrC,IAAIA,gBAAgBC,WAAE,CAACC,UAAU,CAACF,eAAe;QAC7C,OAAOG,QAAQC,aAAI,CAACC,OAAO,CAACL;IAChC;AACJ"}
|
package/dist/webpack/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PluginOptions as MiniCssExtractPlugInOptions } from 'mini-css-extract-p
|
|
|
3
3
|
import { Configuration } from 'webpack';
|
|
4
4
|
import { BuildContext, BuildIdentity, BuildOptions } from '../core';
|
|
5
5
|
import { WebpackConfiguration } from '../utils';
|
|
6
|
-
export type Options = Partial<Pick<BuildIdentity, 'name' | 'light' | 'headless' | 'emitExposedDependencies'
|
|
6
|
+
export type Options = Partial<Pick<BuildIdentity, 'name' | 'light' | 'headless' | 'emitExposedDependencies'> & Pick<BuildOptions, 'codeCoverage' | 'buildStat'>>;
|
|
7
7
|
export interface Overrides {
|
|
8
8
|
configuration?: Configuration;
|
|
9
9
|
plugins?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webpack/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,aAAa,IAAI,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,OAAO,CACzB,IAAI,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webpack/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,aAAa,IAAI,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,OAAO,CACzB,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,yBAAyB,CAAC,GAC1E,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,WAAW,CAAC,CACvD,CAAC;AAEF,MAAM,WAAW,SAAS;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE;QACN,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;QAC7C,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;KACtD,CAAC;CACL;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-webpack-build-context.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/create-webpack-build-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"create-webpack-build-context.d.ts","sourceRoot":"","sources":["../../../src/webpack/utils/create-webpack-build-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CAE3F"}
|
|
@@ -11,9 +11,8 @@ Object.defineProperty(exports, "createWebpackBuildContext", {
|
|
|
11
11
|
const _core = require("../../core");
|
|
12
12
|
const _utils = require("../../utils");
|
|
13
13
|
function createWebpackBuildContext(options) {
|
|
14
|
-
const context = (0, _core.createBuildContext)(options);
|
|
15
14
|
return {
|
|
16
|
-
...
|
|
15
|
+
...(0, _core.createBuildContext)(options),
|
|
17
16
|
bundlerConfig: (0, _utils.getWebpackConfiguration)()
|
|
18
17
|
};
|
|
19
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/webpack/utils/create-webpack-build-context.ts"],"sourcesContent":["import { BuildContextOptions, createBuildContext } from '../../core';\nimport { getWebpackConfiguration } from '../../utils';\nimport { WebpackBuildContext } from '../types';\n\nexport function createWebpackBuildContext(options: BuildContextOptions): WebpackBuildContext {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/webpack/utils/create-webpack-build-context.ts"],"sourcesContent":["import { BuildContextOptions, createBuildContext } from '../../core';\nimport { getWebpackConfiguration } from '../../utils';\nimport { WebpackBuildContext } from '../types';\n\nexport function createWebpackBuildContext(options: BuildContextOptions): WebpackBuildContext {\n return { ...createBuildContext(options), bundlerConfig: getWebpackConfiguration() };\n}\n"],"names":["createWebpackBuildContext","options","createBuildContext","bundlerConfig","getWebpackConfiguration"],"mappings":";;;;+BAIgBA;;;eAAAA;;;sBAJwC;uBAChB;AAGjC,SAASA,0BAA0BC,OAA4B;IAClE,OAAO;QAAE,GAAGC,IAAAA,wBAAkB,EAACD,QAAQ;QAAEE,eAAeC,IAAAA,8BAAuB;IAAG;AACtF"}
|