@servicetitan/startup 34.3.0-beta.2 → 35.0.0
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/dist/cli/commands/build.d.ts +0 -16
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +2 -15
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +0 -1
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/get-command.js +2 -2
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/mfe-check.d.ts.map +1 -1
- package/dist/cli/commands/mfe-check.js +2 -2
- package/dist/cli/commands/mfe-check.js.map +1 -1
- package/dist/cli/commands/mfe-generate-metadata.js +2 -2
- package/dist/cli/commands/mfe-generate-metadata.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +10 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +12 -0
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-package-rollback.d.ts +10 -1
- package/dist/cli/commands/mfe-package-rollback.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-rollback.js +15 -3
- package/dist/cli/commands/mfe-package-rollback.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +10 -4
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/mfe-purge-cache.d.ts +57 -0
- package/dist/cli/commands/mfe-purge-cache.d.ts.map +1 -0
- package/dist/cli/commands/mfe-purge-cache.js +101 -0
- package/dist/cli/commands/mfe-purge-cache.js.map +1 -0
- package/dist/cli/commands/start.d.ts +0 -8
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +2 -8
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/{utils.d.ts → utils/build-rollback-tag.d.ts} +1 -2
- package/dist/cli/commands/utils/build-rollback-tag.d.ts.map +1 -0
- package/dist/cli/commands/{utils.js → utils/build-rollback-tag.js} +1 -5
- package/dist/cli/commands/utils/build-rollback-tag.js.map +1 -0
- package/dist/cli/commands/utils/constants.d.ts +2 -0
- package/dist/cli/commands/utils/constants.d.ts.map +1 -0
- package/dist/cli/commands/utils/constants.js +13 -0
- package/dist/cli/commands/utils/constants.js.map +1 -0
- package/dist/cli/commands/utils/index.d.ts +4 -0
- package/dist/cli/commands/utils/index.d.ts.map +1 -0
- package/dist/{core → cli/commands/utils}/index.js +3 -7
- package/dist/cli/commands/utils/index.js.map +1 -0
- package/dist/cli/commands/utils/purge-cache.d.ts +6 -0
- package/dist/cli/commands/utils/purge-cache.d.ts.map +1 -0
- package/dist/cli/commands/utils/purge-cache.js +21 -0
- package/dist/cli/commands/utils/purge-cache.js.map +1 -0
- package/dist/cli/utils/bundle.d.ts +5 -2
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +98 -18
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/cli-os.js +1 -1
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/storybook-config/webpack-final.d.ts +1 -1
- package/dist/storybook-config/webpack-final.d.ts.map +1 -1
- package/dist/storybook-config/webpack-final.js +6 -18
- package/dist/storybook-config/webpack-final.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +1 -28
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +2 -42
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-package-data.d.ts.map +1 -1
- package/dist/utils/get-package-data.js +2 -3
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/webpack/configs/amd-config.d.ts +2 -3
- package/dist/webpack/configs/amd-config.d.ts.map +1 -1
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/cache-config.d.ts +2 -3
- package/dist/webpack/configs/cache-config.d.ts.map +1 -1
- package/dist/webpack/configs/cache-config.js +1 -1
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +2 -3
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +1 -1
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.d.ts +2 -3
- package/dist/webpack/configs/devtool-config.d.ts.map +1 -1
- package/dist/webpack/configs/devtool-config.js +1 -1
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts +2 -3
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +5 -6
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.d.ts +2 -3
- package/dist/webpack/configs/externals-config.d.ts.map +1 -1
- package/dist/webpack/configs/externals-config.js +14 -4
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +1 -0
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.d.ts +2 -2
- package/dist/webpack/configs/loaders/css-loader.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +1 -2
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.d.ts +2 -2
- package/dist/webpack/configs/loaders/style-loader.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +1 -4
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/module-config.d.ts +2 -3
- package/dist/webpack/configs/module-config.d.ts.map +1 -1
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.d.ts +2 -3
- package/dist/webpack/configs/optimization-config.d.ts.map +1 -1
- package/dist/webpack/configs/optimization-config.js +7 -10
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.d.ts +2 -3
- package/dist/webpack/configs/output-config.d.ts.map +1 -1
- package/dist/webpack/configs/output-config.js +24 -15
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts +8 -3
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +47 -10
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +6 -6
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +13 -4
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +12 -4
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +6 -4
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/filter-warnings-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +2 -2
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/html-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +2 -5
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-tags-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/html-tags-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/html-tags-plugin.js +19 -8
- package/dist/webpack/configs/plugins/html-tags-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts +3 -0
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts.map +1 -0
- package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/check-resource.js +2 -2
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.d.ts.map +1 -0
- package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/get-package-json.js +2 -2
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts +3 -17
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +6 -45
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.d.ts.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.d.ts.map +1 -0
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -0
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +2 -4
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/moment-locales-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.js +1 -1
- package/dist/webpack/configs/plugins/remove-empty-scripts-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.d.ts +3 -3
- package/dist/webpack/configs/plugins/virtual-modules-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +56 -13
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts +2 -3
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts +2 -3
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.d.ts +2 -3
- package/dist/webpack/configs/resolve-config.d.ts.map +1 -1
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/css-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +1 -2
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/font-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/image-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +1 -3
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/less-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/scss-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.d.ts +2 -2
- package/dist/webpack/configs/rules/svg-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts +2 -3
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +2 -2
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.d.ts +2 -3
- package/dist/webpack/configs/stats-config.d.ts.map +1 -1
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +35 -0
- package/dist/webpack/configs/types.d.ts.map +1 -0
- package/dist/webpack/configs/types.js.map +1 -0
- package/dist/webpack/configs/utils/build-metadata.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/build-metadata.js +1 -1
- package/dist/webpack/configs/utils/build-metadata.js.map +1 -0
- package/dist/webpack/configs/utils/generate-metadata.d.ts +3 -0
- package/dist/webpack/configs/utils/generate-metadata.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/generate-metadata.js +4 -5
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -0
- package/dist/webpack/configs/utils/get-bundle-type.d.ts +3 -0
- package/dist/webpack/configs/utils/get-bundle-type.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/get-bundle-type.js +2 -5
- package/dist/webpack/configs/utils/get-bundle-type.js.map +1 -0
- package/dist/webpack/configs/utils/get-exposed-dependencies.d.ts.map +1 -0
- package/dist/webpack/configs/utils/get-exposed-dependencies.js.map +1 -0
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/get-launchdarkly-sdk-version.js +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -0
- package/dist/webpack/configs/utils/get-web-components-version.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/get-web-components-version.js +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -0
- package/dist/webpack/configs/utils/index.d.ts +4 -0
- package/dist/webpack/configs/utils/index.d.ts.map +1 -0
- package/dist/{core → webpack/configs}/utils/index.js +0 -5
- package/dist/webpack/configs/utils/index.js.map +1 -0
- package/dist/webpack/configs/watch-options-config.d.ts +2 -2
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -1
- package/dist/webpack/configs/watch-options-config.js +2 -2
- package/dist/webpack/configs/watch-options-config.js.map +1 -1
- package/dist/webpack/create-webpack-config.d.ts +0 -10
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +41 -108
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/types.d.ts +11 -4
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/utils/index.d.ts +1 -0
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +1 -0
- package/dist/webpack/utils/index.js.map +1 -1
- package/dist/webpack/utils/stringify-config.d.ts.map +1 -0
- package/dist/webpack/utils/stringify-config.js.map +1 -0
- package/package.json +16 -19
- package/src/cli/commands/__tests__/mfe-generate-metadata.test.ts +4 -3
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +27 -1
- package/src/cli/commands/__tests__/mfe-package-rollback.test.ts +31 -0
- package/src/cli/commands/__tests__/mfe-publish.test.ts +4 -2
- package/src/cli/commands/__tests__/mfe-purge-cache.test.ts +141 -0
- package/src/cli/commands/build.ts +2 -7
- package/src/cli/commands/bundle-package.ts +1 -3
- package/src/cli/commands/get-command.ts +2 -2
- package/src/cli/commands/mfe-check.ts +2 -1
- package/src/cli/commands/mfe-generate-metadata.ts +1 -1
- package/src/cli/commands/mfe-package-publish.ts +12 -2
- package/src/cli/commands/mfe-package-rollback.ts +15 -5
- package/src/cli/commands/mfe-publish.ts +14 -3
- package/src/cli/commands/mfe-purge-cache.ts +75 -0
- package/src/cli/commands/start.ts +2 -5
- package/src/cli/commands/utils/__tests__/purge-cache.test.ts +40 -0
- package/src/cli/commands/{utils.ts → utils/build-rollback-tag.ts} +0 -1
- package/src/cli/commands/utils/constants.ts +1 -0
- package/src/cli/commands/utils/index.ts +3 -0
- package/src/cli/commands/utils/purge-cache.ts +13 -0
- package/src/cli/utils/__tests__/bundle.test.ts +10 -19
- package/src/cli/utils/bundle.ts +101 -20
- package/src/cli/utils/cli-os.ts +1 -1
- package/src/index.ts +0 -1
- package/src/storybook-config/__tests__/webpack-final.test.ts +2 -5
- package/src/storybook-config/webpack-final.ts +10 -24
- package/src/utils/__tests__/get-configuration.test.ts +1 -99
- package/src/utils/__tests__/get-package-data.test.ts +1 -35
- package/src/utils/get-configuration.ts +2 -92
- package/src/utils/get-package-data.ts +1 -3
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +2 -2
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +11 -11
- package/src/webpack/__tests__/create-webpack-config.test.ts +2 -3
- package/src/webpack/configs/amd-config.ts +2 -3
- package/src/webpack/configs/cache-config.ts +3 -4
- package/src/webpack/configs/dev-server-config.ts +3 -8
- package/src/webpack/configs/devtool-config.ts +3 -4
- package/src/webpack/configs/entry.config.ts +7 -8
- package/src/webpack/configs/externals-config.ts +21 -5
- package/src/webpack/configs/index.ts +1 -0
- package/src/webpack/configs/loaders/css-loader.ts +2 -3
- package/src/webpack/configs/loaders/style-loader.ts +5 -5
- package/src/webpack/configs/module-config.ts +2 -3
- package/src/webpack/configs/optimization-config.ts +11 -16
- package/src/webpack/configs/output-config.ts +22 -16
- package/src/webpack/configs/plugins/assets-manifest-plugin.ts +36 -9
- package/src/webpack/configs/plugins/bundle-analyser-plugin.ts +8 -8
- package/src/webpack/configs/plugins/define-exposed-dependencies-plugin.ts +15 -7
- package/src/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.ts +13 -7
- package/src/webpack/configs/plugins/define-web-component-name-plugin.ts +8 -7
- package/src/webpack/configs/plugins/filter-warnings-plugin.ts +3 -4
- package/src/webpack/configs/plugins/html-plugin.ts +6 -7
- package/src/webpack/configs/plugins/html-tags-plugin.ts +16 -7
- package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/__tests__/check-resource.test.ts +5 -18
- package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/check-resource.ts +4 -4
- package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/get-package-json.ts +2 -2
- package/src/webpack/configs/plugins/ignore-plugin/ignore-plugin.ts +6 -48
- package/src/webpack/configs/plugins/mini-css-extract-plugin.ts +5 -10
- package/src/webpack/configs/plugins/moment-locales-plugin.ts +2 -3
- package/src/webpack/configs/plugins/remove-empty-scripts-plugin.ts +3 -4
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +65 -13
- package/src/webpack/configs/plugins/watch-run-plugin.ts +2 -3
- package/src/webpack/configs/plugins-config.ts +2 -3
- package/src/webpack/configs/resolve-config.ts +2 -3
- package/src/webpack/configs/rules/css-rules.ts +3 -4
- package/src/webpack/configs/rules/font-rules.ts +2 -2
- package/src/webpack/configs/rules/image-rules.ts +2 -2
- package/src/webpack/configs/rules/js-rules.ts +2 -4
- package/src/webpack/configs/rules/less-rules.ts +2 -2
- package/src/webpack/configs/rules/scss-rules.ts +2 -2
- package/src/webpack/configs/rules/svg-rules.ts +2 -2
- package/src/webpack/configs/rules-config.ts +5 -9
- package/src/webpack/configs/stats-config.ts +2 -3
- package/src/webpack/configs/types.ts +38 -0
- package/src/{core → webpack/configs}/utils/__tests__/build-metadata.test.ts +2 -2
- package/src/{core → webpack/configs}/utils/__tests__/generate-metadata.test.ts +13 -27
- package/src/{core → webpack/configs}/utils/build-metadata.ts +1 -1
- package/src/{core → webpack/configs}/utils/generate-metadata.ts +6 -7
- package/src/webpack/configs/utils/get-bundle-type.ts +22 -0
- package/src/{core → webpack/configs}/utils/get-launchdarkly-sdk-version.ts +1 -1
- package/src/{core → webpack/configs}/utils/get-web-components-version.ts +1 -1
- package/src/webpack/configs/utils/index.ts +3 -0
- package/src/webpack/configs/watch-options-config.ts +3 -3
- package/src/webpack/create-webpack-config.ts +43 -85
- package/src/webpack/types.ts +11 -7
- package/src/webpack/utils/index.ts +1 -0
- package/dist/cli/commands/bundle-vite.d.ts +0 -66
- package/dist/cli/commands/bundle-vite.d.ts.map +0 -1
- package/dist/cli/commands/bundle-vite.js +0 -184
- package/dist/cli/commands/bundle-vite.js.map +0 -1
- package/dist/cli/commands/utils.d.ts.map +0 -1
- package/dist/cli/commands/utils.js.map +0 -1
- package/dist/core/check-resource/check-resource.d.ts +0 -3
- package/dist/core/check-resource/check-resource.d.ts.map +0 -1
- package/dist/core/check-resource/check-resource.js.map +0 -1
- package/dist/core/check-resource/get-package-json.d.ts.map +0 -1
- package/dist/core/check-resource/get-package-json.js.map +0 -1
- package/dist/core/check-resource/index.d.ts +0 -2
- package/dist/core/check-resource/index.d.ts.map +0 -1
- package/dist/core/check-resource/index.js +0 -13
- package/dist/core/check-resource/index.js.map +0 -1
- package/dist/core/check-resource/is-optional-peer-dependency.d.ts.map +0 -1
- package/dist/core/check-resource/is-optional-peer-dependency.js.map +0 -1
- package/dist/core/check-resource/is-optional-react-dom-peer-dependency.d.ts.map +0 -1
- package/dist/core/check-resource/is-optional-react-dom-peer-dependency.js.map +0 -1
- package/dist/core/context.d.ts +0 -14
- package/dist/core/context.d.ts.map +0 -1
- package/dist/core/context.js +0 -62
- package/dist/core/context.js.map +0 -1
- package/dist/core/defines/exposed-dependencies.d.ts +0 -5
- package/dist/core/defines/exposed-dependencies.d.ts.map +0 -1
- package/dist/core/defines/exposed-dependencies.js +0 -26
- package/dist/core/defines/exposed-dependencies.js.map +0 -1
- package/dist/core/defines/exposed-instance-dependencies.d.ts +0 -5
- package/dist/core/defines/exposed-instance-dependencies.d.ts.map +0 -1
- package/dist/core/defines/exposed-instance-dependencies.js +0 -29
- package/dist/core/defines/exposed-instance-dependencies.js.map +0 -1
- package/dist/core/defines/index.d.ts +0 -4
- package/dist/core/defines/index.d.ts.map +0 -1
- package/dist/core/defines/index.js +0 -26
- package/dist/core/defines/index.js.map +0 -1
- package/dist/core/defines/web-component-name.d.ts +0 -5
- package/dist/core/defines/web-component-name.d.ts.map +0 -1
- package/dist/core/defines/web-component-name.js +0 -23
- package/dist/core/defines/web-component-name.js.map +0 -1
- package/dist/core/externals.d.ts +0 -3
- package/dist/core/externals.d.ts.map +0 -1
- package/dist/core/externals.js +0 -29
- package/dist/core/externals.js.map +0 -1
- package/dist/core/get-exposed-dependencies-entry-points.d.ts +0 -11
- package/dist/core/get-exposed-dependencies-entry-points.d.ts.map +0 -1
- package/dist/core/get-exposed-dependencies-entry-points.js +0 -82
- package/dist/core/get-exposed-dependencies-entry-points.js.map +0 -1
- package/dist/core/index.d.ts +0 -9
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/types.d.ts +0 -55
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/core/utils/build-metadata.d.ts.map +0 -1
- package/dist/core/utils/build-metadata.js.map +0 -1
- package/dist/core/utils/generate-metadata.d.ts +0 -3
- package/dist/core/utils/generate-metadata.d.ts.map +0 -1
- package/dist/core/utils/generate-metadata.js.map +0 -1
- package/dist/core/utils/get-bundle-type.d.ts +0 -3
- package/dist/core/utils/get-bundle-type.d.ts.map +0 -1
- package/dist/core/utils/get-bundle-type.js.map +0 -1
- package/dist/core/utils/get-exposed-dependencies.d.ts.map +0 -1
- package/dist/core/utils/get-exposed-dependencies.js.map +0 -1
- package/dist/core/utils/get-launchdarkly-sdk-version.d.ts.map +0 -1
- package/dist/core/utils/get-launchdarkly-sdk-version.js.map +0 -1
- package/dist/core/utils/get-output-path.d.ts +0 -3
- package/dist/core/utils/get-output-path.d.ts.map +0 -1
- package/dist/core/utils/get-output-path.js +0 -32
- package/dist/core/utils/get-output-path.js.map +0 -1
- package/dist/core/utils/get-web-components-version.d.ts.map +0 -1
- package/dist/core/utils/get-web-components-version.js.map +0 -1
- package/dist/core/utils/index.d.ts +0 -9
- package/dist/core/utils/index.d.ts.map +0 -1
- package/dist/core/utils/index.js.map +0 -1
- package/dist/core/utils/stringify-config.d.ts.map +0 -1
- package/dist/core/utils/stringify-config.js.map +0 -1
- package/dist/core/virtual-modules.d.ts +0 -9
- package/dist/core/virtual-modules.d.ts.map +0 -1
- package/dist/core/virtual-modules.js +0 -84
- package/dist/core/virtual-modules.js.map +0 -1
- package/dist/vite/base-config.d.ts +0 -4
- package/dist/vite/base-config.d.ts.map +0 -1
- package/dist/vite/base-config.js +0 -76
- package/dist/vite/base-config.js.map +0 -1
- package/dist/vite/build-shared-deps.d.ts +0 -3
- package/dist/vite/build-shared-deps.d.ts.map +0 -1
- package/dist/vite/build-shared-deps.js +0 -310
- package/dist/vite/build-shared-deps.js.map +0 -1
- package/dist/vite/create-vite-config.d.ts +0 -3
- package/dist/vite/create-vite-config.d.ts.map +0 -1
- package/dist/vite/create-vite-config.js +0 -52
- package/dist/vite/create-vite-config.js.map +0 -1
- package/dist/vite/define-config.d.ts +0 -12
- package/dist/vite/define-config.d.ts.map +0 -1
- package/dist/vite/define-config.js +0 -15
- package/dist/vite/define-config.js.map +0 -1
- package/dist/vite/load-config-file.d.ts +0 -6
- package/dist/vite/load-config-file.d.ts.map +0 -1
- package/dist/vite/load-config-file.js +0 -107
- package/dist/vite/load-config-file.js.map +0 -1
- package/dist/vite/merge-config.d.ts +0 -6
- package/dist/vite/merge-config.d.ts.map +0 -1
- package/dist/vite/merge-config.js +0 -106
- package/dist/vite/merge-config.js.map +0 -1
- package/dist/vite/plugins/css-injector-plugin.d.ts +0 -15
- package/dist/vite/plugins/css-injector-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/css-injector-plugin.js +0 -76
- package/dist/vite/plugins/css-injector-plugin.js.map +0 -1
- package/dist/vite/plugins/dev-server-routing-plugin.d.ts +0 -12
- package/dist/vite/plugins/dev-server-routing-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/dev-server-routing-plugin.js +0 -85
- package/dist/vite/plugins/dev-server-routing-plugin.js.map +0 -1
- package/dist/vite/plugins/externals-plugin.d.ts +0 -4
- package/dist/vite/plugins/externals-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/externals-plugin.js +0 -39
- package/dist/vite/plugins/externals-plugin.js.map +0 -1
- package/dist/vite/plugins/html-plugin.d.ts +0 -5
- package/dist/vite/plugins/html-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/html-plugin.js +0 -74
- package/dist/vite/plugins/html-plugin.js.map +0 -1
- package/dist/vite/plugins/ignore-modules-plugin.d.ts +0 -4
- package/dist/vite/plugins/ignore-modules-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/ignore-modules-plugin.js +0 -30
- package/dist/vite/plugins/ignore-modules-plugin.js.map +0 -1
- package/dist/vite/plugins/index.d.ts +0 -10
- package/dist/vite/plugins/index.d.ts.map +0 -1
- package/dist/vite/plugins/index.js +0 -28
- package/dist/vite/plugins/index.js.map +0 -1
- package/dist/vite/plugins/metadata-plugin.d.ts +0 -4
- package/dist/vite/plugins/metadata-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/metadata-plugin.js +0 -86
- package/dist/vite/plugins/metadata-plugin.js.map +0 -1
- package/dist/vite/plugins/style-urls-plugin.d.ts +0 -4
- package/dist/vite/plugins/style-urls-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/style-urls-plugin.js +0 -29
- package/dist/vite/plugins/style-urls-plugin.js.map +0 -1
- package/dist/vite/plugins/svgr-plugin.d.ts +0 -4
- package/dist/vite/plugins/svgr-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/svgr-plugin.js +0 -31
- package/dist/vite/plugins/svgr-plugin.js.map +0 -1
- package/dist/vite/plugins/virtual-modules-plugin.d.ts +0 -4
- package/dist/vite/plugins/virtual-modules-plugin.d.ts.map +0 -1
- package/dist/vite/plugins/virtual-modules-plugin.js +0 -71
- package/dist/vite/plugins/virtual-modules-plugin.js.map +0 -1
- package/patches/vite-plugin-css-injected-by-js+3.5.2.patch +0 -63
- package/src/cli/commands/bundle-vite.ts +0 -112
- package/src/core/check-resource/index.ts +0 -1
- package/src/core/context.ts +0 -65
- package/src/core/defines/exposed-dependencies.ts +0 -21
- package/src/core/defines/exposed-instance-dependencies.ts +0 -19
- package/src/core/defines/index.ts +0 -3
- package/src/core/defines/web-component-name.ts +0 -15
- package/src/core/externals.ts +0 -23
- package/src/core/get-exposed-dependencies-entry-points.ts +0 -59
- package/src/core/index.ts +0 -8
- package/src/core/types.ts +0 -59
- package/src/core/utils/get-bundle-type.ts +0 -20
- package/src/core/utils/get-output-path.ts +0 -18
- package/src/core/utils/index.ts +0 -8
- package/src/core/virtual-modules.ts +0 -76
- package/src/vite/__tests__/define-config.test.ts +0 -13
- package/src/vite/__tests__/load-config-file.test.ts +0 -115
- package/src/vite/__tests__/merge-config.test.ts +0 -173
- package/src/vite/base-config.ts +0 -79
- package/src/vite/build-shared-deps.ts +0 -320
- package/src/vite/create-vite-config.ts +0 -50
- package/src/vite/define-config.ts +0 -20
- package/src/vite/index.html +0 -29
- package/src/vite/load-config-file.ts +0 -54
- package/src/vite/merge-config.ts +0 -93
- package/src/vite/plugins/css-injector-plugin.ts +0 -85
- package/src/vite/plugins/dev-server-routing-plugin.ts +0 -89
- package/src/vite/plugins/externals-plugin.ts +0 -27
- package/src/vite/plugins/html-plugin.ts +0 -65
- package/src/vite/plugins/ignore-modules-plugin.ts +0 -22
- package/src/vite/plugins/index.ts +0 -9
- package/src/vite/plugins/metadata-plugin.ts +0 -78
- package/src/vite/plugins/style-urls-plugin.ts +0 -34
- package/src/vite/plugins/svgr-plugin.ts +0 -11
- package/src/vite/plugins/virtual-modules-plugin.ts +0 -74
- package/src/webpack/configs/plugins/ignore-plugin/empty-module.js +0 -1
- /package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/get-package-json.d.ts +0 -0
- /package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-peer-dependency.d.ts +0 -0
- /package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-peer-dependency.js +0 -0
- /package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-react-dom-peer-dependency.d.ts +0 -0
- /package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-react-dom-peer-dependency.js +0 -0
- /package/dist/{core → webpack/configs}/types.js +0 -0
- /package/dist/{core → webpack/configs}/utils/build-metadata.d.ts +0 -0
- /package/dist/{core → webpack/configs}/utils/get-exposed-dependencies.d.ts +0 -0
- /package/dist/{core → webpack/configs}/utils/get-exposed-dependencies.js +0 -0
- /package/dist/{core → webpack/configs}/utils/get-launchdarkly-sdk-version.d.ts +0 -0
- /package/dist/{core → webpack/configs}/utils/get-web-components-version.d.ts +0 -0
- /package/dist/{core → webpack}/utils/stringify-config.d.ts +0 -0
- /package/dist/{core → webpack}/utils/stringify-config.js +0 -0
- /package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/__tests__/get-package-json.test.ts +0 -0
- /package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/__tests__/is-optional-peer-dependency.test.ts +0 -0
- /package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/__tests__/is-optional-react-dom-peer-dependency.test.ts +0 -0
- /package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-peer-dependency.ts +0 -0
- /package/src/{core/check-resource → webpack/configs/plugins/ignore-plugin}/is-optional-react-dom-peer-dependency.ts +0 -0
- /package/src/{core → webpack/configs}/utils/__tests__/get-exposed-dependencies.test.ts +0 -0
- /package/src/{core → webpack/configs}/utils/__tests__/get-launchdarkly-sdk-version.test.ts +0 -0
- /package/src/{core → webpack/configs}/utils/__tests__/get-web-components-version.test.ts +0 -0
- /package/src/{core → webpack/configs}/utils/get-exposed-dependencies.ts +0 -0
- /package/src/{core → webpack}/utils/stringify-config.ts +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { rolldown } from 'rolldown';
|
|
4
|
-
import type { BuildContext } from '../core/types';
|
|
5
|
-
import type { ViteConfigOverride } from './define-config';
|
|
6
|
-
|
|
7
|
-
type ConfigFileExport = ViteConfigOverride | ((context: BuildContext) => ViteConfigOverride);
|
|
8
|
-
|
|
9
|
-
const PROD_FILES = ['vite.prod.config.ts', 'vite.prod.config.js'] as const;
|
|
10
|
-
const DEV_FILES = ['vite.dev.config.ts', 'vite.dev.config.js'] as const;
|
|
11
|
-
|
|
12
|
-
export async function loadConfigFile(
|
|
13
|
-
root: string,
|
|
14
|
-
isProduction: boolean
|
|
15
|
-
): Promise<ConfigFileExport | undefined> {
|
|
16
|
-
const candidates = isProduction ? PROD_FILES : DEV_FILES;
|
|
17
|
-
const configPath = candidates.map(f => path.join(root, f)).find(f => fs.existsSync(f));
|
|
18
|
-
|
|
19
|
-
if (!configPath) {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const bundle = await rolldown({
|
|
24
|
-
input: configPath,
|
|
25
|
-
external: [/^[^./]/],
|
|
26
|
-
});
|
|
27
|
-
const { output } = await bundle.generate({ format: 'cjs' });
|
|
28
|
-
const code = output[0].code;
|
|
29
|
-
|
|
30
|
-
/*
|
|
31
|
-
* Write to node_modules/.vite-temp/ (same approach as Vite) so Node can resolve
|
|
32
|
-
* package imports relative to the project's node_modules
|
|
33
|
-
*/
|
|
34
|
-
const tmpDir = path.resolve(root, 'node_modules', '.vite-temp');
|
|
35
|
-
if (!fs.existsSync(tmpDir)) {
|
|
36
|
-
fs.mkdirSync(tmpDir, { recursive: true });
|
|
37
|
-
}
|
|
38
|
-
const tmpFile = path.join(
|
|
39
|
-
tmpDir,
|
|
40
|
-
`vite-config-${Date.now()}-${Math.random().toString(36).slice(2)}.cjs`
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
fs.writeFileSync(tmpFile, code);
|
|
45
|
-
const mod = await import(tmpFile);
|
|
46
|
-
return mod.default;
|
|
47
|
-
} finally {
|
|
48
|
-
try {
|
|
49
|
-
fs.unlinkSync(tmpFile);
|
|
50
|
-
} catch {
|
|
51
|
-
// ignore cleanup errors
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
package/src/vite/merge-config.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { InlineConfig, Plugin } from 'vite';
|
|
2
|
-
import { mergeConfig } from 'vite';
|
|
3
|
-
import type { BuildContext } from '../core/types';
|
|
4
|
-
import { omit } from '../utils';
|
|
5
|
-
import type { ViteConfiguration } from '../utils/get-configuration';
|
|
6
|
-
import type { ViteConfigOverride } from './define-config';
|
|
7
|
-
import {
|
|
8
|
-
cssInjectorPlugin,
|
|
9
|
-
devServerRoutingPlugin,
|
|
10
|
-
externalsPlugin,
|
|
11
|
-
htmlPlugin,
|
|
12
|
-
ignoreModulesPlugin,
|
|
13
|
-
metadataPlugin,
|
|
14
|
-
styleUrlsPlugin,
|
|
15
|
-
svgrPlugin,
|
|
16
|
-
virtualModulesPlugin,
|
|
17
|
-
} from './plugins';
|
|
18
|
-
|
|
19
|
-
function resolveOverrides(pkgJsonConfig: ViteConfiguration, fileConfig: ViteConfigOverride) {
|
|
20
|
-
const {
|
|
21
|
-
omitDefault: pkgOmit = [],
|
|
22
|
-
pluginOverrides: pkgPluginOverrides = {},
|
|
23
|
-
minify: pkgMinify = {},
|
|
24
|
-
config: pkgViteConfig = {},
|
|
25
|
-
} = pkgJsonConfig;
|
|
26
|
-
const {
|
|
27
|
-
omitDefault: fileOmit = [],
|
|
28
|
-
pluginOverrides: filePluginOverrides = {},
|
|
29
|
-
minify: fileMinify = {},
|
|
30
|
-
config: fileViteConfig = {},
|
|
31
|
-
} = fileConfig;
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
omitDefault: [...pkgOmit, ...fileOmit],
|
|
35
|
-
pluginOverrides: {
|
|
36
|
-
htmlTemplate: {
|
|
37
|
-
...pkgPluginOverrides.htmlTemplate,
|
|
38
|
-
...filePluginOverrides.htmlTemplate,
|
|
39
|
-
},
|
|
40
|
-
svgr: { ...pkgPluginOverrides.svgr, ...filePluginOverrides.svgr },
|
|
41
|
-
},
|
|
42
|
-
minify: { ...pkgMinify, ...fileMinify },
|
|
43
|
-
pkgViteConfig,
|
|
44
|
-
fileViteConfig,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function createPlugins(context: BuildContext, overrides: ReturnType<typeof resolveOverrides>) {
|
|
49
|
-
const entries: [string, Plugin | Plugin[]][] = [
|
|
50
|
-
['htmlTemplate', htmlPlugin(context, overrides.pluginOverrides.htmlTemplate)],
|
|
51
|
-
['svgr', svgrPlugin(overrides.pluginOverrides.svgr)],
|
|
52
|
-
['externals', externalsPlugin(context)],
|
|
53
|
-
['virtualModules', virtualModulesPlugin(context)],
|
|
54
|
-
['cssInjector', cssInjectorPlugin(context)],
|
|
55
|
-
['styleUrls', styleUrlsPlugin(context)],
|
|
56
|
-
['metadata', metadataPlugin(context)],
|
|
57
|
-
['devServerRouting', devServerRoutingPlugin(context)],
|
|
58
|
-
['ignoreModules', ignoreModulesPlugin(context)],
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
return entries
|
|
62
|
-
.filter(([name]) => !overrides.omitDefault.includes(`plugins.${name}`))
|
|
63
|
-
.flatMap(([, plugin]) => (Array.isArray(plugin) ? plugin : [plugin]));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function mergeViteConfigs(
|
|
67
|
-
baseConfig: InlineConfig,
|
|
68
|
-
pkgJsonConfig: ViteConfiguration,
|
|
69
|
-
fileConfig: ViteConfigOverride,
|
|
70
|
-
context: BuildContext
|
|
71
|
-
): InlineConfig {
|
|
72
|
-
const overrides = resolveOverrides(pkgJsonConfig, fileConfig);
|
|
73
|
-
const { omitDefault, minify, pkgViteConfig, fileViteConfig } = overrides;
|
|
74
|
-
|
|
75
|
-
const baseWithOmit = omit(
|
|
76
|
-
{ ...baseConfig },
|
|
77
|
-
omitDefault.filter(k => !k.startsWith('plugins.'))
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
if (minify.js !== undefined) {
|
|
81
|
-
baseWithOmit.build = { ...baseWithOmit.build, minify: !!minify.js };
|
|
82
|
-
}
|
|
83
|
-
if (minify.css !== undefined) {
|
|
84
|
-
baseWithOmit.build = {
|
|
85
|
-
...baseWithOmit.build,
|
|
86
|
-
cssMinify: !!minify.css,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const plugins = createPlugins(context, overrides);
|
|
91
|
-
baseWithOmit.plugins = plugins;
|
|
92
|
-
return mergeConfig(mergeConfig(baseWithOmit, pkgViteConfig), fileViteConfig);
|
|
93
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
|
|
3
|
-
import type { BuildContext } from '../../core';
|
|
4
|
-
|
|
5
|
-
interface StyleData {
|
|
6
|
-
css: string;
|
|
7
|
-
attributes: Record<string, string>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare global {
|
|
11
|
-
interface Window {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
-
__VITE_WEB_COMPONENT_STYLES__?: Record<string, StyleData[]>;
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
15
|
-
__injectWebComponentStyles__?: Record<string, ((style: StyleData) => void)[]>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function cssInjectorPlugin({ build: { name, isProduction } }: BuildContext): Plugin[] {
|
|
20
|
-
if (isProduction) {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return cssInjectedByJsPlugin({
|
|
25
|
-
dev: {
|
|
26
|
-
enableDev: true,
|
|
27
|
-
removeStyleCodeFunction: function removeStyleCodeFunction(id: string, styleId: string) {
|
|
28
|
-
const componentName = styleId;
|
|
29
|
-
const styles = window.__VITE_WEB_COMPONENT_STYLES__?.[componentName];
|
|
30
|
-
|
|
31
|
-
if (!styles) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Find the style with matching data-vite-dev-id
|
|
36
|
-
const styleIndex = styles.findIndex(
|
|
37
|
-
style => style.attributes['data-vite-dev-id'] === id
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
if (styleIndex !== -1) {
|
|
41
|
-
// Empty the CSS content
|
|
42
|
-
styles[styleIndex].css = '';
|
|
43
|
-
|
|
44
|
-
// Call callbacks with empty style data
|
|
45
|
-
const callbacks = window.__injectWebComponentStyles__?.[componentName];
|
|
46
|
-
if (callbacks) {
|
|
47
|
-
callbacks.forEach(callback => callback(styles[styleIndex]));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
styleId: name,
|
|
53
|
-
injectCodeFunction: function injectWebComponentStyles(cssCode, options) {
|
|
54
|
-
const componentName = options.styleId as string;
|
|
55
|
-
const styleData = {
|
|
56
|
-
css: cssCode,
|
|
57
|
-
attributes: options.attributes!,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// Store in array for components that haven't initialized yet
|
|
61
|
-
window.__VITE_WEB_COMPONENT_STYLES__ ??= {};
|
|
62
|
-
window.__VITE_WEB_COMPONENT_STYLES__[componentName] ??= [];
|
|
63
|
-
|
|
64
|
-
// Check if style with this data-vite-dev-id already exists
|
|
65
|
-
const devId = options.attributes!['data-vite-dev-id'];
|
|
66
|
-
const existingIndex = window.__VITE_WEB_COMPONENT_STYLES__[componentName].findIndex(
|
|
67
|
-
style => style.attributes['data-vite-dev-id'] === devId
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
if (existingIndex !== -1) {
|
|
71
|
-
// Update existing style
|
|
72
|
-
window.__VITE_WEB_COMPONENT_STYLES__[componentName][existingIndex] = styleData;
|
|
73
|
-
} else {
|
|
74
|
-
// Add new style
|
|
75
|
-
window.__VITE_WEB_COMPONENT_STYLES__[componentName].push(styleData);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Call all registered callbacks with the style data
|
|
79
|
-
const callbacks = window.__injectWebComponentStyles__?.[componentName];
|
|
80
|
-
if (callbacks) {
|
|
81
|
-
callbacks.forEach(callback => callback(styleData));
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import type { Plugin } from 'vite';
|
|
4
|
-
import type { BuildContext } from '../../core';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Configures URL rewrites and static file serving for dev and preview servers.
|
|
8
|
-
* All server middleware logic is centralized here for discoverability.
|
|
9
|
-
*
|
|
10
|
-
* - Host dev: rewrites `/shared/...` → `/dist/bundle/shared/...` (shared deps on disk)
|
|
11
|
-
* - MFE dev: strips output path prefix `/dist/bundle/full/...` → `/...`
|
|
12
|
-
* - Prod preview: serves static files (metadata.json) from the destination directory
|
|
13
|
-
*/
|
|
14
|
-
export function devServerRoutingPlugin(context: BuildContext): Plugin {
|
|
15
|
-
const { isProduction } = context.build;
|
|
16
|
-
const { isWebComponent, destination } = context.package;
|
|
17
|
-
let outDir = '';
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
name: 'dev-server-routing',
|
|
21
|
-
|
|
22
|
-
configResolved(config) {
|
|
23
|
-
outDir = config.build.outDir;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
configureServer(server) {
|
|
27
|
-
if (isWebComponent) {
|
|
28
|
-
// MFE dev: strip output path prefix so the dev server can resolve files
|
|
29
|
-
const prefix = '/' + path.relative(process.cwd(), outDir) + '/';
|
|
30
|
-
|
|
31
|
-
server.middlewares.use((req, _res, next) => {
|
|
32
|
-
const url = req.url ?? '';
|
|
33
|
-
if (url.startsWith(prefix)) {
|
|
34
|
-
req.url = '/' + url.slice(prefix.length);
|
|
35
|
-
}
|
|
36
|
-
next();
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
/*
|
|
40
|
-
* Host dev: if a file exists inside outDir (e.g. shared deps at
|
|
41
|
-
* dist/bundle/shared/), rewrite the URL so Vite can serve it.
|
|
42
|
-
*/
|
|
43
|
-
const outDirPrefix = '/' + path.relative(process.cwd(), outDir) + '/';
|
|
44
|
-
|
|
45
|
-
server.middlewares.use((req, _res, next) => {
|
|
46
|
-
const url = req.url ?? '';
|
|
47
|
-
if (url !== '/' && !url.startsWith(outDirPrefix)) {
|
|
48
|
-
const candidate = path.join(outDir, url);
|
|
49
|
-
if (fs.existsSync(candidate) && !fs.statSync(candidate).isDirectory()) {
|
|
50
|
-
req.url = outDirPrefix + url.slice(1);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
next();
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
configurePreviewServer(server) {
|
|
59
|
-
if (!isProduction || !isWebComponent) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Preview: serve static files from destination that aren't in build.outDir
|
|
64
|
-
const destDir = path.resolve(destination);
|
|
65
|
-
const mountPath = '/' + path.relative(process.cwd(), destDir);
|
|
66
|
-
|
|
67
|
-
server.middlewares.use(mountPath, (req, res, next) => {
|
|
68
|
-
const filePath = path.join(destDir, req.url ?? '');
|
|
69
|
-
|
|
70
|
-
if (!fs.existsSync(filePath) || fs.statSync(filePath).isDirectory()) {
|
|
71
|
-
return next();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const ext = path.extname(filePath);
|
|
75
|
-
const contentTypes: Record<string, string> = {
|
|
76
|
-
'.js': 'application/javascript',
|
|
77
|
-
'.css': 'text/css',
|
|
78
|
-
'.json': 'application/json',
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
if (contentTypes[ext]) {
|
|
82
|
-
res.setHeader('Content-Type', contentTypes[ext]);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
fs.createReadStream(filePath).pipe(res);
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import { BuildContext, getExternalsMapping } from '../../core';
|
|
3
|
-
|
|
4
|
-
export function externalsPlugin(context: BuildContext): Plugin[] {
|
|
5
|
-
const entries = getExternalsMapping(context);
|
|
6
|
-
if (!entries) {
|
|
7
|
-
return [];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return [
|
|
11
|
-
{
|
|
12
|
-
name: 'externals',
|
|
13
|
-
resolveId(source: string) {
|
|
14
|
-
if (source in entries) {
|
|
15
|
-
return { id: '\0external:' + source, external: false };
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
load(id: string) {
|
|
19
|
-
if (!id.startsWith('\0external:')) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const dep = id.slice('\0external:'.length);
|
|
23
|
-
return `module.exports = ${entries[dep]};`;
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Eta } from 'eta';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import type { Plugin } from 'vite';
|
|
5
|
-
import { BuildContext, getSharedEntryPoints } from '../../core';
|
|
6
|
-
import type { HtmlTemplatePluginOptions } from '../../utils';
|
|
7
|
-
|
|
8
|
-
export function htmlPlugin(context: BuildContext, options: HtmlTemplatePluginOptions = {}): Plugin {
|
|
9
|
-
const { isWebComponent } = context.package;
|
|
10
|
-
const { name } = context.build;
|
|
11
|
-
const { css, js } = getSharedEntryPoints(context);
|
|
12
|
-
|
|
13
|
-
const htmlTemplatePath = options.template
|
|
14
|
-
? path.resolve(options.template)
|
|
15
|
-
: path.join(
|
|
16
|
-
path.dirname(require.resolve('@servicetitan/startup')),
|
|
17
|
-
'../src/vite/index.html'
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const eta = new Eta({ views: path.dirname(htmlTemplatePath) });
|
|
21
|
-
|
|
22
|
-
function renderHtml() {
|
|
23
|
-
return eta.render(path.basename(htmlTemplatePath), {
|
|
24
|
-
title: options.title ?? 'ServiceTitan',
|
|
25
|
-
favicon: options.favicon,
|
|
26
|
-
css,
|
|
27
|
-
js,
|
|
28
|
-
isWebComponent,
|
|
29
|
-
name,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
name: 'html-template',
|
|
35
|
-
configureServer(server) {
|
|
36
|
-
return () => {
|
|
37
|
-
server.middlewares.use(async (req, res, next) => {
|
|
38
|
-
if (req.url !== '/' && !req.url?.endsWith('.html')) {
|
|
39
|
-
return next();
|
|
40
|
-
}
|
|
41
|
-
let html = renderHtml();
|
|
42
|
-
html = await server.transformIndexHtml(req.url!, html);
|
|
43
|
-
res.end(html);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
// TODO: look into similarity with virtual-modules-plugin
|
|
48
|
-
resolveId(id: string, importer: string | undefined) {
|
|
49
|
-
if (id.endsWith('.html')) {
|
|
50
|
-
return path.resolve('index.html');
|
|
51
|
-
}
|
|
52
|
-
if (importer?.includes('/index.html') && id.startsWith('.')) {
|
|
53
|
-
const resolved = path.resolve(id + '.js');
|
|
54
|
-
if (fs.existsSync(resolved)) {
|
|
55
|
-
return resolved;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
load(id: string) {
|
|
60
|
-
if (id === path.resolve('index.html')) {
|
|
61
|
-
return renderHtml();
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import { BuildContext, checkResource } from '../../core';
|
|
3
|
-
|
|
4
|
-
export function ignoreModulesPlugin(context: BuildContext): Plugin {
|
|
5
|
-
const VIRTUAL_PREFIX = '\0IGNORE';
|
|
6
|
-
|
|
7
|
-
const checker = checkResource(context);
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
name: 'ignore-modules-plugin',
|
|
11
|
-
resolveId(source, importer) {
|
|
12
|
-
if (importer && checker(source, importer)) {
|
|
13
|
-
return `${VIRTUAL_PREFIX}${source}`;
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
load(id) {
|
|
17
|
-
if (id.startsWith(VIRTUAL_PREFIX)) {
|
|
18
|
-
return 'export default {}';
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './css-injector-plugin';
|
|
2
|
-
export * from './dev-server-routing-plugin';
|
|
3
|
-
export * from './externals-plugin';
|
|
4
|
-
export * from './html-plugin';
|
|
5
|
-
export * from './ignore-modules-plugin';
|
|
6
|
-
export * from './metadata-plugin';
|
|
7
|
-
export * from './style-urls-plugin';
|
|
8
|
-
export * from './svgr-plugin';
|
|
9
|
-
export * from './virtual-modules-plugin';
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import type { Plugin } from 'vite';
|
|
4
|
-
import { BuildContext, generateMetadata } from '../../core';
|
|
5
|
-
|
|
6
|
-
export function metadataPlugin(context: BuildContext): Plugin[] {
|
|
7
|
-
if (!context.package.isWebComponent) {
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let outDir = '';
|
|
12
|
-
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
name: 'entrypoints',
|
|
16
|
-
configResolved(config) {
|
|
17
|
-
outDir = config.build.outDir;
|
|
18
|
-
},
|
|
19
|
-
configureServer(server) {
|
|
20
|
-
server.httpServer?.once('listening', () => {
|
|
21
|
-
const address = server.httpServer?.address();
|
|
22
|
-
if (!address || typeof address === 'string') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const entrypoints = {
|
|
27
|
-
type: 'module',
|
|
28
|
-
port: address.port,
|
|
29
|
-
css: [],
|
|
30
|
-
js: ['@vite/client', '@id/__x00__VIRTUAL./index'],
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const entrypointsPath = path.join(outDir, 'entrypoints.json');
|
|
34
|
-
const dir = path.dirname(entrypointsPath);
|
|
35
|
-
|
|
36
|
-
if (!fs.existsSync(dir)) {
|
|
37
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
fs.writeFileSync(entrypointsPath, JSON.stringify(entrypoints, null, 2));
|
|
41
|
-
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
console.log(`\nEntrypoints written to: ${entrypointsPath}`);
|
|
44
|
-
|
|
45
|
-
generateMetadata(context);
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
writeBundle(options, bundle) {
|
|
49
|
-
if (!options.dir) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const js: string[] = [];
|
|
54
|
-
const css: string[] = [];
|
|
55
|
-
|
|
56
|
-
for (const chunk of Object.values(bundle)) {
|
|
57
|
-
if (chunk.type === 'chunk' && chunk.isEntry) {
|
|
58
|
-
js.push(chunk.fileName);
|
|
59
|
-
}
|
|
60
|
-
if (chunk.type === 'asset' && chunk.fileName.endsWith('.css')) {
|
|
61
|
-
css.push(chunk.fileName);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
fs.writeFileSync(
|
|
66
|
-
path.join(options.dir, 'entrypoints.json'),
|
|
67
|
-
JSON.stringify({ type: 'module', css, js }, null, 2)
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
generateMetadata(context);
|
|
71
|
-
fs.copyFileSync(
|
|
72
|
-
path.join(context.package.destination, 'metadata.json'),
|
|
73
|
-
path.join(options.dir, 'metadata.json')
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import type { BuildContext } from '../../core';
|
|
3
|
-
|
|
4
|
-
export function styleUrlsPlugin({
|
|
5
|
-
package: { isWebComponent },
|
|
6
|
-
build: { isProduction },
|
|
7
|
-
}: BuildContext): Plugin[] {
|
|
8
|
-
if (!isWebComponent || !isProduction) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
name: 'style-urls',
|
|
15
|
-
transformIndexHtml: {
|
|
16
|
-
order: 'post' as const,
|
|
17
|
-
handler(html, ctx) {
|
|
18
|
-
const css = ctx.bundle
|
|
19
|
-
? Object.values(ctx.bundle)
|
|
20
|
-
.filter(
|
|
21
|
-
chunk => chunk.type === 'asset' && chunk.fileName.endsWith('.css')
|
|
22
|
-
)
|
|
23
|
-
.map(chunk => chunk.fileName)
|
|
24
|
-
: [];
|
|
25
|
-
|
|
26
|
-
return html.replace(
|
|
27
|
-
'style-urls="%5B%5D"',
|
|
28
|
-
`style-urls="${encodeURIComponent(JSON.stringify(css))}"`
|
|
29
|
-
);
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import svgr from 'vite-plugin-svgr';
|
|
3
|
-
import type { SvgrPluginOptions } from '../../utils';
|
|
4
|
-
|
|
5
|
-
export function svgrPlugin(options: SvgrPluginOptions = {}): Plugin {
|
|
6
|
-
return svgr({
|
|
7
|
-
include: options.include ?? ['**/*.svg?component', '**/@servicetitan/anvil2/**/*.svg'],
|
|
8
|
-
exclude: options.exclude,
|
|
9
|
-
...(options.svgrOptions ? { svgrOptions: options.svgrOptions } : {}),
|
|
10
|
-
});
|
|
11
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import type { Plugin } from 'vite';
|
|
3
|
-
import { BuildContext, virtualModules } from '../../core';
|
|
4
|
-
|
|
5
|
-
function devWebComponentIndexCode(code: string) {
|
|
6
|
-
const lines = code.split('\n');
|
|
7
|
-
|
|
8
|
-
const lastLineIndex = lines.length - 1;
|
|
9
|
-
|
|
10
|
-
if (lines[lastLineIndex].includes('register(App,')) {
|
|
11
|
-
lines[lastLineIndex] = lines[lastLineIndex].replace(
|
|
12
|
-
'register(App,',
|
|
13
|
-
'register(WrappedApp,'
|
|
14
|
-
);
|
|
15
|
-
lines.unshift("import { withStyleInjector } from '@servicetitan/web-components';");
|
|
16
|
-
lines.splice(lastLineIndex + 1, 0, '', 'const WrappedApp = withStyleInjector(App);', '');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return lines.join('\n');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function virtualModulesPlugin(context: BuildContext): Plugin[] {
|
|
23
|
-
const VIRTUAL_PREFIX = '\0VIRTUAL';
|
|
24
|
-
|
|
25
|
-
const { destination } = context.package;
|
|
26
|
-
const { isProduction } = context.build;
|
|
27
|
-
|
|
28
|
-
const modules = virtualModules(context);
|
|
29
|
-
|
|
30
|
-
const viteModules: Record<string, string> = {};
|
|
31
|
-
|
|
32
|
-
if (modules.index) {
|
|
33
|
-
viteModules['./index'] = isProduction
|
|
34
|
-
? modules.index
|
|
35
|
-
: devWebComponentIndexCode(modules.index);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (modules.designSystem) {
|
|
39
|
-
viteModules['./design-system.css'] = modules.designSystem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let rootDir = '';
|
|
43
|
-
|
|
44
|
-
if (Object.keys(viteModules).length === 0) {
|
|
45
|
-
return [];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
name: 'virtual-modules-plugin',
|
|
51
|
-
resolveId(source, importer) {
|
|
52
|
-
if (viteModules[source]) {
|
|
53
|
-
return `${VIRTUAL_PREFIX}${source}`;
|
|
54
|
-
}
|
|
55
|
-
if (importer?.startsWith(VIRTUAL_PREFIX)) {
|
|
56
|
-
const importerNoPrefix = importer.slice(VIRTUAL_PREFIX.length);
|
|
57
|
-
if (viteModules[importerNoPrefix] && source.startsWith('.')) {
|
|
58
|
-
return path.resolve(rootDir, source + '.js');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
load(id) {
|
|
63
|
-
if (id.startsWith(VIRTUAL_PREFIX)) {
|
|
64
|
-
const idNoPrefix = id.slice(VIRTUAL_PREFIX.length);
|
|
65
|
-
|
|
66
|
-
return viteModules[idNoPrefix];
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
configResolved(config) {
|
|
70
|
-
rootDir = path.join(config.root, destination);
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|
/package/dist/{core/check-resource → webpack/configs/plugins/ignore-plugin}/get-package-json.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|