@tramvai/cli 5.53.80 → 6.62.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/bin/spawn.js +8 -2
- package/lib/api/start/application.experimental.d.ts +7 -0
- package/lib/api/start/application.experimental.d.ts.map +1 -0
- package/lib/api/start/application.experimental.js +275 -0
- package/lib/api/start/application.experimental.js.map +1 -0
- package/lib/api/start/index.d.ts +1 -0
- package/lib/api/start/index.d.ts.map +1 -1
- package/lib/api/start/index.js +17 -6
- package/lib/api/start/index.js.map +1 -1
- package/lib/builder/webpack/devServer/setup.d.ts.map +1 -1
- package/lib/builder/webpack/devServer/setup.js +3 -1
- package/lib/builder/webpack/devServer/setup.js.map +1 -1
- package/lib/builder/webpack/providers/analyze/shared.d.ts.map +1 -1
- package/lib/builder/webpack/providers/analyze/shared.js +5 -9
- package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
- package/lib/builder/webpack/providers/client.d.ts.map +1 -1
- package/lib/builder/webpack/providers/client.js +10 -9
- package/lib/builder/webpack/providers/client.js.map +1 -1
- package/lib/builder/webpack/providers/server.d.ts.map +1 -1
- package/lib/builder/webpack/providers/server.js +10 -9
- package/lib/builder/webpack/providers/server.js.map +1 -1
- package/lib/cli/CLI.d.ts +1 -1
- package/lib/cli/CLI.d.ts.map +1 -1
- package/lib/cli/CLI.js.map +1 -1
- package/lib/cli/bin-init.js +0 -2
- package/lib/cli/bin-init.js.map +1 -1
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +1 -12
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/runCLI.d.ts.map +1 -1
- package/lib/cli/runCLI.js.map +1 -1
- package/lib/commands/add/command.d.ts +1 -4
- package/lib/commands/add/command.d.ts.map +1 -1
- package/lib/commands/add/command.js +3 -2
- package/lib/commands/add/command.js.map +1 -1
- package/lib/commands/analyze/command.d.ts +1 -1
- package/lib/commands/analyze/command.d.ts.map +1 -1
- package/lib/commands/analyze/command.js +11 -13
- package/lib/commands/analyze/command.js.map +1 -1
- package/lib/commands/benchmark/command.d.ts +1 -1
- package/lib/commands/benchmark/command.d.ts.map +1 -1
- package/lib/commands/benchmark/command.js +8 -9
- package/lib/commands/benchmark/command.js.map +1 -1
- package/lib/commands/build/build.d.ts.map +1 -1
- package/lib/commands/build/build.js +1 -0
- package/lib/commands/build/build.js.map +1 -1
- package/lib/commands/build/command.d.ts +1 -1
- package/lib/commands/build/command.d.ts.map +1 -1
- package/lib/commands/build/command.js +12 -15
- package/lib/commands/build/command.js.map +1 -1
- package/lib/commands/generate/command.d.ts +1 -1
- package/lib/commands/generate/command.d.ts.map +1 -1
- package/lib/commands/generate/command.js +3 -2
- package/lib/commands/generate/command.js.map +1 -1
- package/lib/commands/lint/command.d.ts +1 -1
- package/lib/commands/lint/command.d.ts.map +1 -1
- package/lib/commands/lint/command.js +3 -2
- package/lib/commands/lint/command.js.map +1 -1
- package/lib/commands/new/command.d.ts +0 -1
- package/lib/commands/new/command.d.ts.map +1 -1
- package/lib/commands/new/command.js +0 -1
- package/lib/commands/new/command.js.map +1 -1
- package/lib/commands/new/steps/installDependencies.js +3 -3
- package/lib/commands/new/steps/installDependencies.js.map +1 -1
- package/lib/commands/start/command.d.ts +1 -1
- package/lib/commands/start/command.d.ts.map +1 -1
- package/lib/commands/start/command.js +18 -15
- package/lib/commands/start/command.js.map +1 -1
- package/lib/commands/start-prod/command.d.ts +1 -1
- package/lib/commands/start-prod/command.d.ts.map +1 -1
- package/lib/commands/start-prod/command.js +11 -13
- package/lib/commands/start-prod/command.js.map +1 -1
- package/lib/commands/static/command.d.ts +1 -1
- package/lib/commands/static/command.d.ts.map +1 -1
- package/lib/commands/static/command.js +7 -3
- package/lib/commands/static/command.js.map +1 -1
- package/lib/commands/update/command.d.ts +1 -4
- package/lib/commands/update/command.d.ts.map +1 -1
- package/lib/commands/update/command.js +3 -2
- package/lib/commands/update/command.js.map +1 -1
- package/lib/external/config.d.ts.map +1 -1
- package/lib/external/config.js.map +1 -1
- package/lib/library/babel/index.d.ts +3 -9
- package/lib/library/babel/index.d.ts.map +1 -1
- package/lib/library/babel/index.js +3 -132
- package/lib/library/babel/index.js.map +1 -1
- package/lib/library/swc/index.d.ts +3 -3
- package/lib/library/swc/index.d.ts.map +1 -1
- package/lib/library/swc/index.js +4 -114
- package/lib/library/swc/index.js.map +1 -1
- package/lib/library/webpack/application/client/common.d.ts.map +1 -1
- package/lib/library/webpack/application/client/common.js +10 -9
- package/lib/library/webpack/application/client/common.js.map +1 -1
- package/lib/library/webpack/application/common.d.ts.map +1 -1
- package/lib/library/webpack/application/common.js +3 -4
- package/lib/library/webpack/application/common.js.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.d.ts.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.js +9 -58
- package/lib/library/webpack/blocks/pwa/client.js.map +1 -1
- package/lib/library/webpack/blocks/resolve.d.ts.map +1 -1
- package/lib/library/webpack/blocks/resolve.js +1 -0
- package/lib/library/webpack/blocks/resolve.js.map +1 -1
- package/lib/library/webpack/child-app/client/common.d.ts.map +1 -1
- package/lib/library/webpack/child-app/client/common.js +2 -2
- package/lib/library/webpack/child-app/client/common.js.map +1 -1
- package/lib/library/webpack/child-app/common.d.ts.map +1 -1
- package/lib/library/webpack/child-app/common.js +3 -4
- package/lib/library/webpack/child-app/common.js.map +1 -1
- package/lib/library/webpack/utils/threadLoader.d.ts.map +1 -1
- package/lib/library/webpack/utils/threadLoader.js +20 -3
- package/lib/library/webpack/utils/threadLoader.js.map +1 -1
- package/lib/library/webpack/utils/transpiler.js +1 -1
- package/lib/library/webpack/utils/transpiler.js.map +1 -1
- package/lib/models/analytics/utils.d.ts +2 -1
- package/lib/models/analytics/utils.d.ts.map +1 -1
- package/lib/models/analytics/utils.js +3 -0
- package/lib/models/analytics/utils.js.map +1 -1
- package/lib/models/command.d.ts +1 -1
- package/lib/models/command.d.ts.map +1 -1
- package/lib/models/command.js +1 -1
- package/lib/models/command.js.map +1 -1
- package/lib/models/context.d.ts +1 -1
- package/lib/models/context.d.ts.map +1 -1
- package/lib/models/logger.d.ts +0 -1
- package/lib/models/logger.d.ts.map +1 -1
- package/lib/models/logger.js +2 -3
- package/lib/models/logger.js.map +1 -1
- package/lib/schema/autogeneratedSchema.json +15 -15
- package/lib/typings/configEntry/application.d.ts +1 -1
- package/lib/typings/configEntry/application.d.ts.map +1 -1
- package/lib/typings/public.d.ts +0 -1
- package/lib/typings/public.d.ts.map +1 -1
- package/lib/typings/public.js +0 -2
- package/lib/typings/public.js.map +1 -1
- package/lib/utils/cpu-profile.d.ts.map +1 -1
- package/lib/utils/cpu-profile.js +0 -1
- package/lib/utils/cpu-profile.js.map +1 -1
- package/package.json +23 -27
- package/schema.json +15 -15
- package/src/api/start/__integration__/start.test.ts +8 -0
- package/src/api/start/application.experimental.ts +305 -0
- package/src/api/start/index.ts +20 -4
- package/src/builder/webpack/devServer/setup.ts +1 -0
- package/src/builder/webpack/providers/analyze/shared.ts +6 -10
- package/src/builder/webpack/providers/client.ts +15 -10
- package/src/builder/webpack/providers/server.ts +15 -10
- package/src/cli/CLI.ts +1 -1
- package/src/cli/bin-init.ts +0 -2
- package/src/cli/index.ts +4 -11
- package/src/cli/runCLI.ts +0 -1
- package/src/commands/add/command.ts +3 -2
- package/src/commands/analyze/command.ts +12 -14
- package/src/commands/benchmark/command.ts +9 -10
- package/src/commands/build/build.ts +2 -0
- package/src/commands/build/command.ts +13 -16
- package/src/commands/generate/command.ts +3 -2
- package/src/commands/lint/command.ts +3 -2
- package/src/commands/new/command.ts +0 -2
- package/src/commands/new/steps/installDependencies.ts +3 -3
- package/src/commands/new/templates/shared/_prettierrc.js.hbs +1 -1
- package/src/commands/start/command.ts +20 -16
- package/src/commands/start-prod/command.ts +12 -14
- package/src/commands/static/command.ts +7 -3
- package/src/commands/update/command.ts +3 -2
- package/src/external/config.ts +1 -0
- package/src/library/babel/index.ts +3 -160
- package/src/library/swc/__integration__/__snapshots__/swc.build.test.ts.snap +46 -28
- package/src/library/swc/__integration__/__snapshots__/swc.start.test.ts.snap +12 -8
- package/src/library/swc/__integration__/swc.start.test.ts +4 -4
- package/src/library/swc/index.ts +3 -139
- package/src/library/webpack/application/client/common.ts +12 -7
- package/src/library/webpack/application/common.ts +8 -4
- package/src/library/webpack/blocks/pwa/client.ts +13 -64
- package/src/library/webpack/blocks/resolve.ts +1 -0
- package/src/library/webpack/child-app/client/common.ts +2 -2
- package/src/library/webpack/child-app/common.ts +7 -5
- package/src/library/webpack/utils/threadLoader.ts +21 -0
- package/src/library/webpack/utils/transpiler.ts +2 -2
- package/src/models/analytics/utils.ts +6 -2
- package/src/models/command.ts +3 -4
- package/src/models/context.ts +1 -1
- package/src/models/logger.ts +1 -3
- package/src/schema/autogeneratedSchema.json +15 -15
- package/src/typings/configEntry/application.ts +5 -1
- package/src/typings/public.ts +0 -2
- package/src/utils/cpu-profile.ts +0 -1
- package/lib/library/babel/plugins/create-token-pure.d.ts +0 -7
- package/lib/library/babel/plugins/create-token-pure.d.ts.map +0 -1
- package/lib/library/babel/plugins/create-token-pure.js +0 -39
- package/lib/library/babel/plugins/create-token-pure.js.map +0 -1
- package/lib/library/babel/plugins/fill-action-name.d.ts +0 -3
- package/lib/library/babel/plugins/fill-action-name.d.ts.map +0 -1
- package/lib/library/babel/plugins/fill-action-name.js +0 -107
- package/lib/library/babel/plugins/fill-action-name.js.map +0 -1
- package/lib/library/babel/plugins/fill-declare-action-name.d.ts +0 -6
- package/lib/library/babel/plugins/fill-declare-action-name.d.ts.map +0 -1
- package/lib/library/babel/plugins/fill-declare-action-name.js +0 -94
- package/lib/library/babel/plugins/fill-declare-action-name.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts +0 -7
- package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/lazy-component.js +0 -75
- package/lib/library/babel/plugins/lazy-component/lazy-component.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js +0 -53
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.js +0 -133
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.js +0 -11
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/isReady.js +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/isReady.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js +0 -15
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.js +0 -16
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/resolve.js +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/resolve.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/types.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/types.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/types.js +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/types.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js +0 -57
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js.map +0 -1
- package/lib/library/babel/plugins/provider-stack.d.ts +0 -4
- package/lib/library/babel/plugins/provider-stack.d.ts.map +0 -1
- package/lib/library/babel/plugins/provider-stack.js +0 -63
- package/lib/library/babel/plugins/provider-stack.js.map +0 -1
- package/lib/library/babel/plugins/react-compiler.d.ts +0 -13
- package/lib/library/babel/plugins/react-compiler.d.ts.map +0 -1
- package/lib/library/babel/plugins/react-compiler.js +0 -27
- package/lib/library/babel/plugins/react-compiler.js.map +0 -1
- package/lib/library/babel/plugins/react-element-info-unique.d.ts +0 -26
- package/lib/library/babel/plugins/react-element-info-unique.d.ts.map +0 -1
- package/lib/library/babel/plugins/react-element-info-unique.js +0 -112
- package/lib/library/babel/plugins/react-element-info-unique.js.map +0 -1
- package/lib/library/babel/plugins/types.h.d.ts +0 -7
- package/lib/library/babel/plugins/types.h.d.ts.map +0 -1
- package/lib/library/babel/plugins/types.h.js +0 -3
- package/lib/library/babel/plugins/types.h.js.map +0 -1
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.d.ts +0 -8
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.js +0 -29
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts +0 -4
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.js +0 -23
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts +0 -24
- package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationFixRange.js +0 -127
- package/lib/library/webpack/plugins/ModuleFederationFixRange.js.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts +0 -15
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js +0 -49
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js.map +0 -1
- package/lib/library/webpack/plugins/PolyfillCondition.d.ts +0 -8
- package/lib/library/webpack/plugins/PolyfillCondition.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PolyfillCondition.js +0 -46
- package/lib/library/webpack/plugins/PolyfillCondition.js.map +0 -1
- package/lib/library/webpack/plugins/PurifyStatsPlugin.d.ts +0 -15
- package/lib/library/webpack/plugins/PurifyStatsPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PurifyStatsPlugin.js +0 -47
- package/lib/library/webpack/plugins/PurifyStatsPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts +0 -12
- package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PwaIconsPlugin.js +0 -78
- package/lib/library/webpack/plugins/PwaIconsPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/WebManifestPlugin.d.ts +0 -13
- package/lib/library/webpack/plugins/WebManifestPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/WebManifestPlugin.js +0 -47
- package/lib/library/webpack/plugins/WebManifestPlugin.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/const.d.ts +0 -3
- package/lib/library/webpack/utils/polyfills/const.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/const.js +0 -49
- package/lib/library/webpack/utils/polyfills/const.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts +0 -8
- package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/polyfillCondition.js +0 -51
- package/lib/library/webpack/utils/polyfills/polyfillCondition.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/specToFeature.d.ts +0 -7
- package/lib/library/webpack/utils/polyfills/specToFeature.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/specToFeature.js +0 -207
- package/lib/library/webpack/utils/polyfills/specToFeature.js.map +0 -1
- package/lib/models/analytics/analytics.d.ts +0 -156
- package/lib/models/analytics/analytics.d.ts.map +0 -1
- package/lib/models/analytics/analytics.js +0 -259
- package/lib/models/analytics/analytics.js.map +0 -1
- package/lib/models/analytics/analytics.worker.d.ts +0 -5
- package/lib/models/analytics/analytics.worker.d.ts.map +0 -1
- package/lib/models/analytics/analytics.worker.js +0 -87
- package/lib/models/analytics/analytics.worker.js.map +0 -1
- package/lib/typings/pwa/index.d.ts +0 -80
- package/lib/typings/pwa/index.d.ts.map +0 -1
- package/lib/typings/pwa/index.js +0 -3
- package/lib/typings/pwa/index.js.map +0 -1
- package/lib/utils/errors.d.ts +0 -7
- package/lib/utils/errors.d.ts.map +0 -1
- package/lib/utils/errors.js +0 -43
- package/lib/utils/errors.js.map +0 -1
- package/lib/utils/memoryUsage.d.ts +0 -20
- package/lib/utils/memoryUsage.d.ts.map +0 -1
- package/lib/utils/memoryUsage.js +0 -51
- package/lib/utils/memoryUsage.js.map +0 -1
- package/lib/utils/sentry.d.ts +0 -2
- package/lib/utils/sentry.d.ts.map +0 -1
- package/lib/utils/sentry.js +0 -27
- package/lib/utils/sentry.js.map +0 -1
- package/src/library/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/do-nothing.ts +0 -10
- package/src/library/babel/plugins/__fixtures__/create-token-pure/from-core.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/from-dippy.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/many-imports.ts +0 -9
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-mixed.ts +0 -17
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-with-name.ts +0 -28
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-without-name.ts +0 -25
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-with-name.ts +0 -21
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-without-name.ts +0 -19
- package/src/library/babel/plugins/__fixtures__/lazy-component/base.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/comments.ts +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/dynamic.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/first.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/path/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/second.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/third.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/lazy+hmr.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/long-import.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy-import.ts +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy.ts +0 -8
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/not-universal.ts +0 -8
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/platform-legacy.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/react-universal.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/tramvai/react/index.es.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/provider-stack/add-stack.ts +0 -22
- package/src/library/babel/plugins/__fixtures__/provider-stack/check-function-name.ts +0 -10
- package/src/library/babel/plugins/__fixtures__/provider-stack/do-nothing.ts +0 -16
- package/src/library/babel/plugins/__fixtures__/provider-stack/error-in-scope.ts +0 -24
- package/src/library/babel/plugins/__fixtures__/provider-stack/inside-await.ts +0 -12
- package/src/library/babel/plugins/__fixtures__/provider-stack/module-decorator.ts +0 -27
- package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +0 -108
- package/src/library/babel/plugins/__snapshots__/fill-declare-action-name.spec.ts.snap +0 -264
- package/src/library/babel/plugins/__snapshots__/provider-stack.spec.ts.snap +0 -362
- package/src/library/babel/plugins/create-token-pure.spec.ts +0 -39
- package/src/library/babel/plugins/create-token-pure.ts +0 -47
- package/src/library/babel/plugins/fill-action-name.ts +0 -126
- package/src/library/babel/plugins/fill-declare-action-name.spec.ts +0 -37
- package/src/library/babel/plugins/fill-declare-action-name.ts +0 -110
- package/src/library/babel/plugins/lazy-component/__snapshots__/lazy-component.spec.ts.snap +0 -313
- package/src/library/babel/plugins/lazy-component/__snapshots__/legacy-universal-replace.spec.ts.snap +0 -114
- package/src/library/babel/plugins/lazy-component/lazy-component.spec.ts +0 -46
- package/src/library/babel/plugins/lazy-component/lazy-component.ts +0 -91
- package/src/library/babel/plugins/lazy-component/legacy-universal-replace.spec.ts +0 -33
- package/src/library/babel/plugins/lazy-component/legacy-universal-replace.ts +0 -88
- package/src/library/babel/plugins/lazy-component/properties/chunkName.ts +0 -185
- package/src/library/babel/plugins/lazy-component/properties/importAsync.ts +0 -8
- package/src/library/babel/plugins/lazy-component/properties/isReady.ts +0 -19
- package/src/library/babel/plugins/lazy-component/properties/requireAsync.ts +0 -20
- package/src/library/babel/plugins/lazy-component/properties/requireSync.ts +0 -21
- package/src/library/babel/plugins/lazy-component/properties/resolve.ts +0 -21
- package/src/library/babel/plugins/lazy-component/properties/types.ts +0 -20
- package/src/library/babel/plugins/lazy-component/properties/utils/webpackComments.ts +0 -61
- package/src/library/babel/plugins/provider-stack.spec.ts +0 -55
- package/src/library/babel/plugins/provider-stack.ts +0 -88
- package/src/library/babel/plugins/react-compiler.ts +0 -39
- package/src/library/babel/plugins/react-element-info-unique.ts +0 -144
- package/src/library/babel/plugins/types.h.ts +0 -8
- package/src/library/webpack/plugins/AssetsIntegritiesPlugin.ts +0 -34
- package/src/library/webpack/plugins/AutoPublicPathPlugin.ts +0 -23
- package/src/library/webpack/plugins/ModuleFederationFixRange.ts +0 -181
- package/src/library/webpack/plugins/ModuleFederationIgnoreEntries.ts +0 -59
- package/src/library/webpack/plugins/PolyfillCondition.ts +0 -62
- package/src/library/webpack/plugins/PurifyStatsPlugin.ts +0 -57
- package/src/library/webpack/plugins/PwaIconsPlugin.ts +0 -94
- package/src/library/webpack/plugins/WebManifestPlugin.ts +0 -62
- package/src/library/webpack/utils/polyfills/__integration__/__snapshots__/condition.test.ts.snap +0 -1348
- package/src/library/webpack/utils/polyfills/__integration__/condition.test.ts +0 -128
- package/src/library/webpack/utils/polyfills/const.ts +0 -46
- package/src/library/webpack/utils/polyfills/polyfillCondition.ts +0 -63
- package/src/library/webpack/utils/polyfills/specToFeature.ts +0 -243
- package/src/models/analytics/analytics.ts +0 -488
- package/src/models/analytics/analytics.worker.ts +0 -102
- package/src/typings/pwa/index.ts +0 -83
- package/src/utils/errors.ts +0 -39
- package/src/utils/memoryUsage.ts +0 -58
- package/src/utils/sentry.ts +0 -25
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkApplication } from '../../validators/commands/checkBuild';
|
|
3
|
-
import { checkConfigExists } from '../../validators/commands/checkConfigExists';
|
|
4
|
-
import { checkDependencies } from '../../validators/commands/checkDependencies';
|
|
5
|
-
import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
|
|
6
2
|
import type { BuildCommand as BuildCommandType } from '../../api/build';
|
|
7
|
-
import { checkPwaDependencies } from '../../validators/commands/checkPwaDependencies';
|
|
8
|
-
import { checkSwcDependencies } from '../../validators/commands/checkSwcDependencies';
|
|
9
|
-
import { checkReactCompilerDependencies } from '../../validators/commands/checkReactCompilerDependencies';
|
|
10
3
|
import { getFeaturesProperties, getProjectProperties } from '../../models/analytics/utils';
|
|
11
4
|
|
|
12
5
|
export type Params = Parameters<BuildCommandType>[0] & {
|
|
@@ -69,15 +62,19 @@ class BuildCommand extends CLICommand<Params> {
|
|
|
69
62
|
|
|
70
63
|
alias = 'b';
|
|
71
64
|
|
|
72
|
-
validators
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
validators() {
|
|
66
|
+
return [
|
|
67
|
+
require('../../validators/commands/checkConfigExists').checkConfigExists,
|
|
68
|
+
require('../../validators/commands/checkBuild').checkApplication,
|
|
69
|
+
require('../../validators/commands/runMigrationsAndCheckVersions')
|
|
70
|
+
.runMigrationsAndCheckVersions,
|
|
71
|
+
require('../../validators/commands/checkDependencies').checkDependencies,
|
|
72
|
+
require('../../validators/commands/checkPwaDependencies').checkPwaDependencies,
|
|
73
|
+
require('../../validators/commands/checkSwcDependencies').checkSwcDependencies,
|
|
74
|
+
require('../../validators/commands/checkReactCompilerDependencies')
|
|
75
|
+
.checkReactCompilerDependencies,
|
|
76
|
+
];
|
|
77
|
+
}
|
|
81
78
|
|
|
82
79
|
async action(parameters: Params) {
|
|
83
80
|
const start = Date.now();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkConfigExists } from '../../validators/commands/checkConfigExists';
|
|
3
2
|
|
|
4
3
|
export type GeneratorName = 'action' | 'reducer' | 'component' | 'page' | 'bundle' | 'module';
|
|
5
4
|
export type Params = {
|
|
@@ -21,7 +20,9 @@ class GenerateCommand extends CLICommand<Params> {
|
|
|
21
20
|
|
|
22
21
|
alias = 'g';
|
|
23
22
|
|
|
24
|
-
validators
|
|
23
|
+
validators() {
|
|
24
|
+
return [require('../../validators/commands/checkConfigExists').checkConfigExists];
|
|
25
|
+
}
|
|
25
26
|
|
|
26
27
|
action(parameters: Params) {
|
|
27
28
|
// used require for lazy code execution
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkApplication } from '../../validators/commands/checkBuild';
|
|
3
2
|
|
|
4
3
|
class LintCommand extends CLICommand {
|
|
5
4
|
name = 'lint';
|
|
@@ -12,7 +11,9 @@ class LintCommand extends CLICommand {
|
|
|
12
11
|
|
|
13
12
|
alias = 'l';
|
|
14
13
|
|
|
15
|
-
validators
|
|
14
|
+
validators() {
|
|
15
|
+
return [require('../../validators/commands/checkBuild').checkApplication];
|
|
16
|
+
}
|
|
16
17
|
|
|
17
18
|
action() {
|
|
18
19
|
return Promise.resolve({
|
|
@@ -62,7 +62,7 @@ const devDependencies = [
|
|
|
62
62
|
'postcss-nested',
|
|
63
63
|
'husky@^4',
|
|
64
64
|
'lint-staged',
|
|
65
|
-
'prettier-config
|
|
65
|
+
'@tramvai/prettier-config',
|
|
66
66
|
'typescript',
|
|
67
67
|
];
|
|
68
68
|
|
|
@@ -126,7 +126,7 @@ export async function installDependencies({
|
|
|
126
126
|
|
|
127
127
|
// Install cli and core packages into the root of repository if using workspaces for update command to work correctly
|
|
128
128
|
if (workspace !== undefined) {
|
|
129
|
-
console.log(`${chalk.blue('[DEPENDENCIES]')} Installing root dependencies`);
|
|
129
|
+
console.log(`${chalk.blue('[DEPENDENCIES]')} Installing root dev dependencies`);
|
|
130
130
|
|
|
131
131
|
await packageManager.install({
|
|
132
132
|
packageNames: deps(type, { isDev: true, isRoot: true }),
|
|
@@ -135,7 +135,7 @@ export async function installDependencies({
|
|
|
135
135
|
workspace: undefined,
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
console.log(`${chalk.blue('[DEPENDENCIES]')} Installing root
|
|
138
|
+
console.log(`${chalk.blue('[DEPENDENCIES]')} Installing root dependencies`);
|
|
139
139
|
|
|
140
140
|
await packageManager.install({
|
|
141
141
|
packageNames: deps(type, { isDev: false, isRoot: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('prettier-config
|
|
1
|
+
module.exports = require('@tramvai/prettier-config');
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkApplication } from '../../validators/commands/checkBuild';
|
|
3
|
-
import { checkConfigExists } from '../../validators/commands/checkConfigExists';
|
|
4
|
-
import { checkDependencies } from '../../validators/commands/checkDependencies';
|
|
5
|
-
import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
|
|
6
2
|
import type { StartCommand as StartCommandType } from '../../api/start';
|
|
7
|
-
import { checkPwaDependencies } from '../../validators/commands/checkPwaDependencies';
|
|
8
|
-
import { checkSwcDependencies } from '../../validators/commands/checkSwcDependencies';
|
|
9
|
-
import { checkReactCompilerDependencies } from '../../validators/commands/checkReactCompilerDependencies';
|
|
10
3
|
import { getFeaturesProperties, getProjectProperties } from '../../models/analytics/utils';
|
|
11
4
|
|
|
12
5
|
export type Params = Parameters<StartCommandType>[0] & {
|
|
@@ -124,19 +117,30 @@ export class StartCommand extends CLICommand<Params> {
|
|
|
124
117
|
value: '[httpsCert]',
|
|
125
118
|
description: 'Path to https certificate',
|
|
126
119
|
},
|
|
120
|
+
{
|
|
121
|
+
name: '--experimentalWebpackWorkerThreads',
|
|
122
|
+
value: '[experimentalWebpackWorkerThreads]',
|
|
123
|
+
transformer: (value: string) => value !== 'false',
|
|
124
|
+
description:
|
|
125
|
+
'Enable new experimental @tramvai/api builder to run webpack compilation in worker threads',
|
|
126
|
+
},
|
|
127
127
|
];
|
|
128
128
|
|
|
129
129
|
alias = 's';
|
|
130
130
|
|
|
131
|
-
validators
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
validators() {
|
|
132
|
+
return [
|
|
133
|
+
require('../../validators/commands/checkConfigExists').checkConfigExists,
|
|
134
|
+
require('../../validators/commands/checkBuild').checkApplication,
|
|
135
|
+
require('../../validators/commands/runMigrationsAndCheckVersions')
|
|
136
|
+
.runMigrationsAndCheckVersions,
|
|
137
|
+
require('../../validators/commands/checkDependencies').checkDependencies,
|
|
138
|
+
require('../../validators/commands/checkPwaDependencies').checkPwaDependencies,
|
|
139
|
+
require('../../validators/commands/checkSwcDependencies').checkSwcDependencies,
|
|
140
|
+
require('../../validators/commands/checkReactCompilerDependencies')
|
|
141
|
+
.checkReactCompilerDependencies,
|
|
142
|
+
];
|
|
143
|
+
}
|
|
140
144
|
|
|
141
145
|
async action(parameters) {
|
|
142
146
|
const start = Date.now();
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkConfigExists } from '../../validators/commands/checkConfigExists';
|
|
3
|
-
import { checkApplication } from '../../validators/commands/checkBuild';
|
|
4
|
-
import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
|
|
5
|
-
import { checkPwaDependencies } from '../../validators/commands/checkPwaDependencies';
|
|
6
|
-
import { checkSwcDependencies } from '../../validators/commands/checkSwcDependencies';
|
|
7
|
-
import { checkReactCompilerDependencies } from '../../validators/commands/checkReactCompilerDependencies';
|
|
8
2
|
|
|
9
3
|
export interface Params {
|
|
10
4
|
target: string;
|
|
@@ -106,14 +100,18 @@ export class StartProdCommand extends CLICommand<Params> {
|
|
|
106
100
|
|
|
107
101
|
alias = 'sp';
|
|
108
102
|
|
|
109
|
-
validators
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
103
|
+
validators() {
|
|
104
|
+
return [
|
|
105
|
+
require('../../validators/commands/checkConfigExists').checkConfigExists,
|
|
106
|
+
require('../../validators/commands/checkBuild').checkApplication,
|
|
107
|
+
require('../../validators/commands/runMigrationsAndCheckVersions')
|
|
108
|
+
.runMigrationsAndCheckVersions,
|
|
109
|
+
require('../../validators/commands/checkPwaDependencies').checkPwaDependencies,
|
|
110
|
+
require('../../validators/commands/checkSwcDependencies').checkSwcDependencies,
|
|
111
|
+
require('../../validators/commands/checkReactCompilerDependencies')
|
|
112
|
+
.checkReactCompilerDependencies,
|
|
113
|
+
];
|
|
114
|
+
}
|
|
117
115
|
|
|
118
116
|
action(parameters: Params) {
|
|
119
117
|
// used require for lazy code execution
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkApplication } from '../../validators/commands/checkBuild';
|
|
3
|
-
import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
|
|
4
2
|
|
|
5
3
|
export type Params = {
|
|
6
4
|
target: string;
|
|
@@ -67,7 +65,13 @@ export class StaticCommand extends CLICommand<Params> {
|
|
|
67
65
|
|
|
68
66
|
alias = 'st';
|
|
69
67
|
|
|
70
|
-
validators
|
|
68
|
+
validators() {
|
|
69
|
+
return [
|
|
70
|
+
require('../../validators/commands/checkBuild').checkApplication,
|
|
71
|
+
require('../../validators/commands/runMigrationsAndCheckVersions')
|
|
72
|
+
.runMigrationsAndCheckVersions,
|
|
73
|
+
];
|
|
74
|
+
}
|
|
71
75
|
|
|
72
76
|
action(parameters: Params) {
|
|
73
77
|
// used require for lazy code execution
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CLICommand } from '../../models/command';
|
|
2
|
-
import { checkVersion } from './checkVersionValidator';
|
|
3
2
|
import type { Params } from './update';
|
|
4
3
|
|
|
5
4
|
class UpdateCommand extends CLICommand {
|
|
@@ -22,7 +21,9 @@ class UpdateCommand extends CLICommand {
|
|
|
22
21
|
|
|
23
22
|
alias = 'u';
|
|
24
23
|
|
|
25
|
-
validators
|
|
24
|
+
validators() {
|
|
25
|
+
return [require('./checkVersionValidator').checkVersion];
|
|
26
|
+
}
|
|
26
27
|
|
|
27
28
|
async action(parameters: Params) {
|
|
28
29
|
// used require for lazy code execution
|
package/src/external/config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// This configuration is virtual and generated in packages/cli/src/library/webpack/blocks/configResolve.ts
|
|
1
2
|
import type { ConfigManager } from '../config/configManager';
|
|
2
3
|
import type { ApplicationConfigEntry } from '../typings/configEntry/application';
|
|
3
4
|
import type { ModuleConfigEntry } from '../typings/configEntry/module';
|
|
@@ -1,161 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { sync as resolve } from 'resolve';
|
|
3
|
-
import type { TransformOptions } from '@babel/core';
|
|
1
|
+
import { configFactory } from '@tramvai/plugin-babel-transpiler/lib/config-factory';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const envConfig = {
|
|
9
|
-
production: {
|
|
10
|
-
plugins: [
|
|
11
|
-
'@babel/plugin-transform-react-constant-elements',
|
|
12
|
-
[
|
|
13
|
-
'transform-react-remove-prop-types',
|
|
14
|
-
{
|
|
15
|
-
removeImport: true,
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
function hasJsxRuntime() {
|
|
23
|
-
try {
|
|
24
|
-
resolve('react/jsx-runtime', { basedir: process.cwd() });
|
|
25
|
-
return true;
|
|
26
|
-
} catch (e) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line complexity
|
|
32
|
-
export const babelConfigFactory = ({
|
|
33
|
-
env = 'development',
|
|
34
|
-
isServer = false,
|
|
35
|
-
modules = false,
|
|
36
|
-
actualTarget,
|
|
37
|
-
generateDataQaTag = true,
|
|
38
|
-
enableFillActionNamePlugin = false,
|
|
39
|
-
enableFillDeclareActionNamePlugin = false,
|
|
40
|
-
// for testing only!
|
|
41
|
-
// @ts-expect-error
|
|
42
|
-
markCreateTokenAsPure = true,
|
|
43
|
-
typescript = false,
|
|
44
|
-
loader = true,
|
|
45
|
-
removeTypeofWindow,
|
|
46
|
-
tramvai = false,
|
|
47
|
-
hot = false,
|
|
48
|
-
excludesPresetEnv,
|
|
49
|
-
browsersListTargets,
|
|
50
|
-
reactCompiler = false,
|
|
51
|
-
loose = true,
|
|
52
|
-
externalHelpers = true,
|
|
53
|
-
}: Partial<TranspilerConfig>) => {
|
|
54
|
-
const cfg = envConfig[env] || {};
|
|
55
|
-
|
|
56
|
-
const babelConfig: Record<string, any> = {
|
|
57
|
-
// по умолчанию sourceType: 'module' и тогда бабель рассматривает все файлы как es-модули, что может
|
|
58
|
-
// вызвать проблемы в некоторых случаях когда бабель обрабатывает уже скомпиленный в commonjs файл
|
|
59
|
-
// как модуль добавляя в него es-импорты и вводя этим вебпак в ступор на счет типа файла
|
|
60
|
-
// unambiguos - режим когда бабель попытается предугадать тип компилируемого файла и уже на этой
|
|
61
|
-
// основе добавлять соответствующие импорты
|
|
62
|
-
sourceType: 'unambiguous' as const,
|
|
63
|
-
|
|
64
|
-
// Это необходимо для того, чтобы деструктуризация array-like сущностей, например, Set
|
|
65
|
-
// не приводила к невалидному коду при сборке для старых браузеров:
|
|
66
|
-
// [...new Set()] => [].concat(new Set())
|
|
67
|
-
// https://babeljs.io/docs/assumptions#arraylikeisiterable
|
|
68
|
-
assumptions: {
|
|
69
|
-
arrayLikeIsIterable: true,
|
|
70
|
-
iterableIsArray: false,
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
presets: [
|
|
74
|
-
[
|
|
75
|
-
'@babel/preset-env',
|
|
76
|
-
{
|
|
77
|
-
modules,
|
|
78
|
-
useBuiltIns: 'entry',
|
|
79
|
-
// from core-js version depends on what polyfills will be included with `useBuiltIns: 'entry'` option
|
|
80
|
-
// this logic is here - https://github.com/zloirock/core-js/blob/master/packages/core-js-compat/src/modules-by-versions.mjs
|
|
81
|
-
corejs: require('core-js/package.json').version,
|
|
82
|
-
// TODO: will be deprecated in babel@8 - https://babeljs.io/docs/babel-preset-env#loose
|
|
83
|
-
loose,
|
|
84
|
-
targets: browsersListTargets,
|
|
85
|
-
browserslistEnv: actualTarget,
|
|
86
|
-
bugfixes: true,
|
|
87
|
-
exclude: excludesPresetEnv,
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
[
|
|
91
|
-
'@babel/preset-react',
|
|
92
|
-
{
|
|
93
|
-
runtime: hasJsxRuntime() ? 'automatic' : 'classic',
|
|
94
|
-
useSpread: true,
|
|
95
|
-
development: env === 'development',
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
typescript && '@babel/preset-typescript',
|
|
99
|
-
]
|
|
100
|
-
.concat(cfg.presets || [])
|
|
101
|
-
.filter(Boolean) as TransformOptions['presets'],
|
|
102
|
-
|
|
103
|
-
plugins: [
|
|
104
|
-
// React compiler must be the first plugin in the chain
|
|
105
|
-
getReactCompilerPlugin({ isServer, options: reactCompiler }),
|
|
106
|
-
// TODO: useESModules is deprecated and should work automatically - https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
|
|
107
|
-
externalHelpers && [
|
|
108
|
-
'@babel/transform-runtime',
|
|
109
|
-
{ useESModules: !(isServer && env === 'development') },
|
|
110
|
-
],
|
|
111
|
-
path.resolve(__dirname, './plugins/lazy-component/legacy-universal-replace'), // TODO: удалить плагин после того как отпадёт необходимость поддерживать легаси
|
|
112
|
-
path.resolve(__dirname, './plugins/lazy-component/lazy-component'),
|
|
113
|
-
enableFillDeclareActionNamePlugin &&
|
|
114
|
-
path.resolve(__dirname, './plugins/fill-declare-action-name'),
|
|
115
|
-
generateDataQaTag && path.resolve(__dirname, './plugins/react-element-info-unique'), // Собственный плагин. Необходимо удалить в будущем
|
|
116
|
-
enableFillActionNamePlugin && path.resolve(__dirname, './plugins/fill-action-name'), // Собственный плагин. Необходимо удалить в будущем
|
|
117
|
-
markCreateTokenAsPure && path.resolve(__dirname, './plugins/create-token-pure'),
|
|
118
|
-
'@tinkoff/babel-plugin-lodash/cjs',
|
|
119
|
-
isServer && 'babel-plugin-dynamic-import-node',
|
|
120
|
-
[
|
|
121
|
-
'@babel/plugin-proposal-decorators',
|
|
122
|
-
{
|
|
123
|
-
legacy: true,
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
'@babel/plugin-proposal-export-default-from',
|
|
127
|
-
removeTypeofWindow && [
|
|
128
|
-
'transform-define',
|
|
129
|
-
{
|
|
130
|
-
'typeof window': isServer ? 'undefined' : 'object',
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
tramvai && env === 'development' && path.resolve(__dirname, './plugins/provider-stack'),
|
|
134
|
-
!isServer &&
|
|
135
|
-
env === 'development' &&
|
|
136
|
-
hot && ['react-refresh/babel', { skipEnvCheck: process.env.NODE_ENV === 'test' }],
|
|
137
|
-
]
|
|
138
|
-
.concat(cfg.plugins || [])
|
|
139
|
-
.filter(Boolean),
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
if (typeof browsersListTargets !== 'undefined') {
|
|
143
|
-
// to prevent from reading browserslist config for every processed module (sometimes it is not cached in browserslist),
|
|
144
|
-
// don't know why, but target from preset-env plugin options is ignored from this process
|
|
145
|
-
babelConfig.targets = browsersListTargets;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const loaderConfig = loader
|
|
149
|
-
? {
|
|
150
|
-
cwd: path.resolve(__dirname, '..', '..', '..'),
|
|
151
|
-
compact: false,
|
|
152
|
-
}
|
|
153
|
-
: {};
|
|
154
|
-
|
|
155
|
-
return {
|
|
156
|
-
...babelConfig,
|
|
157
|
-
...loaderConfig,
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export default babelConfigFactory;
|
|
3
|
+
export { configFactory as babelConfigFactory };
|
|
4
|
+
export default configFactory;
|