@modern-js/app-tools 2.69.4 → 3.0.0-alpha.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/modern.js +2 -8
- package/dist/cjs/builder/builder-rspack/index.js +35 -27
- package/dist/cjs/builder/generator/adapterCopy.js +75 -46
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +83 -81
- package/dist/cjs/builder/generator/createCopyPattern.js +59 -58
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +80 -82
- package/dist/cjs/builder/generator/index.js +70 -85
- package/dist/cjs/builder/index.js +44 -47
- package/dist/cjs/builder/shared/builderPlugins/adapterBasic.js +106 -83
- package/dist/cjs/builder/shared/builderPlugins/adapterHtml.js +79 -74
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +131 -165
- package/dist/cjs/builder/shared/builderPlugins/builderHooks.js +47 -46
- package/dist/cjs/builder/shared/builderPlugins/index.js +76 -25
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +66 -49
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +51 -50
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +178 -317
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +69 -23
- package/dist/cjs/builder/shared/createCopyInfo.js +54 -43
- package/dist/cjs/builder/shared/index.js +69 -23
- package/dist/cjs/builder/shared/loaders/serverModuleLoader.js +35 -23
- package/dist/cjs/builder/shared/types.js +17 -15
- package/dist/cjs/commands/build.js +107 -96
- package/dist/cjs/commands/deploy.js +40 -32
- package/dist/cjs/commands/dev.js +122 -141
- package/dist/cjs/commands/index.js +74 -121
- package/dist/cjs/commands/inspect.js +45 -39
- package/dist/cjs/commands/serve.js +87 -84
- package/dist/cjs/compat/hooks.js +97 -177
- package/dist/cjs/compat/index.js +57 -59
- package/dist/cjs/compat/utils.js +125 -116
- package/dist/cjs/config/default.js +118 -225
- package/dist/cjs/config/index.js +62 -23
- package/dist/cjs/config/initialize/index.js +37 -29
- package/dist/cjs/config/initialize/inits.js +92 -106
- package/dist/cjs/constants.js +37 -37
- package/dist/cjs/defineConfig.js +33 -35
- package/dist/cjs/esm/esbuild-loader.js +62 -0
- package/dist/cjs/esm/esbuild-loader.mjs +11 -23
- package/dist/cjs/esm/register-esm.js +85 -0
- package/dist/cjs/esm/register-esm.mjs +41 -54
- package/dist/cjs/esm/ts-node-loader.js +62 -0
- package/dist/cjs/esm/ts-node-loader.mjs +11 -23
- package/dist/cjs/esm/utils.js +69 -0
- package/dist/cjs/esm/utils.mjs +24 -36
- package/dist/cjs/exports/server.js +16 -26
- package/dist/cjs/index.js +288 -199
- package/dist/cjs/locale/en.js +70 -62
- package/dist/cjs/locale/index.js +42 -33
- package/dist/cjs/locale/zh.js +70 -62
- package/dist/cjs/plugins/analyze/constants.js +43 -36
- package/dist/cjs/plugins/analyze/getBundleEntry.js +90 -94
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +110 -137
- package/dist/cjs/plugins/analyze/getHtmlTemplate.js +125 -127
- package/dist/cjs/plugins/analyze/getServerRoutes.js +160 -164
- package/dist/cjs/plugins/analyze/index.js +221 -208
- package/dist/cjs/plugins/analyze/isDefaultExportFunction.js +81 -76
- package/dist/cjs/plugins/analyze/templates.js +36 -28
- package/dist/cjs/plugins/analyze/utils.js +109 -104
- package/dist/cjs/plugins/deploy/index.js +64 -56
- package/dist/cjs/plugins/deploy/platforms/gh-pages.js +82 -86
- package/dist/cjs/plugins/deploy/platforms/netlify-entry.js +35 -2
- package/dist/cjs/plugins/deploy/platforms/netlify-handler.js +86 -62
- package/dist/cjs/plugins/deploy/platforms/netlify.js +145 -157
- package/dist/cjs/plugins/deploy/platforms/node-entry.js +73 -45
- package/dist/cjs/plugins/deploy/platforms/node.js +113 -113
- package/dist/cjs/plugins/deploy/platforms/platform.js +17 -15
- package/dist/cjs/plugins/deploy/platforms/vercel-entry.js +36 -2
- package/dist/cjs/plugins/deploy/platforms/vercel-handler.js +87 -63
- package/dist/cjs/plugins/deploy/platforms/vercel.js +165 -169
- package/dist/cjs/plugins/deploy/utils.js +85 -85
- package/dist/cjs/plugins/initialize/index.js +86 -91
- package/dist/cjs/plugins/serverBuild.js +85 -78
- package/dist/cjs/plugins/serverRuntime.js +46 -34
- package/dist/cjs/run/index.js +86 -128
- package/dist/cjs/types/config/deploy.js +17 -15
- package/dist/cjs/types/config/dev.js +17 -15
- package/dist/cjs/types/config/experiments.js +17 -15
- package/dist/cjs/types/config/html.js +17 -15
- package/dist/cjs/types/config/index.js +55 -19
- package/dist/cjs/types/config/output.js +17 -15
- package/dist/cjs/types/config/performance.js +17 -15
- package/dist/cjs/types/config/resolve.js +17 -15
- package/dist/cjs/types/config/security.js +17 -15
- package/dist/cjs/types/config/source.js +17 -15
- package/dist/cjs/types/config/testing.js +17 -15
- package/dist/cjs/types/config/tools.js +17 -15
- package/dist/cjs/types/index.js +55 -23
- package/dist/cjs/types/plugin.js +18 -0
- package/dist/cjs/types/utils.js +17 -15
- package/dist/cjs/utils/config.js +40 -80
- package/dist/cjs/utils/createServer.js +46 -47
- package/dist/cjs/utils/env.js +41 -35
- package/dist/cjs/utils/generateWatchFiles.js +49 -60
- package/dist/cjs/utils/getConfigFile.js +46 -38
- package/dist/cjs/utils/getSelectedEntries.js +55 -53
- package/dist/cjs/utils/initAppContext.js +66 -59
- package/dist/cjs/utils/loadPlugins.js +77 -70
- package/dist/cjs/utils/printInstructions.js +39 -31
- package/dist/cjs/utils/register.js +108 -117
- package/dist/cjs/utils/restart.js +46 -41
- package/dist/cjs/utils/routes.js +60 -52
- package/dist/cjs/utils/types.js +17 -15
- package/dist/esm/builder/builder-rspack/index.mjs +6 -0
- package/dist/esm/builder/generator/adapterCopy.mjs +35 -0
- package/dist/esm/builder/generator/createBuilderProviderConfig.mjs +59 -0
- package/dist/esm/builder/generator/createCopyPattern.mjs +30 -0
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +56 -0
- package/dist/esm/builder/generator/index.mjs +45 -0
- package/dist/esm/builder/index.mjs +7 -0
- package/dist/esm/builder/shared/builderPlugins/adapterBasic.mjs +78 -0
- package/dist/esm/builder/shared/builderPlugins/adapterHtml.mjs +55 -0
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +117 -0
- package/dist/esm/builder/shared/builderPlugins/builderHooks.mjs +17 -0
- package/dist/esm/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +37 -0
- package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +22 -0
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +157 -0
- package/dist/esm/builder/shared/createCopyInfo.mjs +15 -0
- package/dist/esm/builder/shared/loaders/serverModuleLoader.mjs +5 -0
- package/dist/esm/commands/build.mjs +68 -0
- package/dist/esm/commands/deploy.mjs +10 -0
- package/dist/esm/commands/dev.mjs +82 -0
- package/dist/esm/commands/index.mjs +37 -0
- package/dist/esm/commands/inspect.mjs +15 -0
- package/dist/esm/commands/serve.mjs +47 -0
- package/dist/esm/compat/hooks.mjs +67 -0
- package/dist/esm/compat/index.mjs +28 -0
- package/dist/esm/compat/utils.mjs +95 -0
- package/dist/esm/config/default.mjs +90 -0
- package/dist/{esm-node/config/index.js → esm/config/index.mjs} +0 -1
- package/dist/esm/config/initialize/index.mjs +7 -0
- package/dist/esm/config/initialize/inits.mjs +54 -0
- package/dist/esm/constants.mjs +3 -0
- package/dist/esm/defineConfig.mjs +2 -0
- package/dist/esm/esm/esbuild-loader.mjs +18 -29
- package/dist/esm/esm/register-esm.mjs +45 -57
- package/dist/esm/esm/ts-node-loader.mjs +18 -30
- package/dist/esm/esm/utils.mjs +31 -42
- package/dist/esm/index.mjs +121 -0
- package/dist/esm/locale/en.mjs +42 -0
- package/dist/esm/locale/index.mjs +9 -0
- package/dist/esm/locale/zh.mjs +42 -0
- package/dist/esm/plugins/analyze/constants.mjs +8 -0
- package/dist/esm/plugins/analyze/getBundleEntry.mjs +53 -0
- package/dist/esm/plugins/analyze/getFileSystemEntry.mjs +66 -0
- package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +85 -0
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +130 -0
- package/dist/esm/plugins/analyze/index.mjs +193 -0
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +41 -0
- package/dist/esm/plugins/analyze/templates.mjs +22 -0
- package/dist/esm/plugins/analyze/utils.mjs +55 -0
- package/dist/esm/plugins/deploy/index.mjs +38 -0
- package/dist/esm/plugins/deploy/platforms/gh-pages.mjs +43 -0
- package/dist/esm/plugins/deploy/platforms/netlify-entry.mjs +2 -1
- package/dist/esm/plugins/deploy/platforms/netlify-handler.mjs +85 -0
- package/dist/esm/plugins/deploy/platforms/netlify.mjs +111 -0
- package/dist/esm/plugins/deploy/platforms/node-entry.mjs +68 -0
- package/dist/esm/plugins/deploy/platforms/node.mjs +77 -0
- package/dist/esm/plugins/deploy/platforms/vercel-entry.mjs +3 -3
- package/dist/esm/plugins/deploy/platforms/vercel-handler.mjs +85 -0
- package/dist/esm/plugins/deploy/platforms/vercel.mjs +131 -0
- package/dist/esm/plugins/deploy/utils.mjs +39 -0
- package/dist/esm/plugins/initialize/index.mjs +59 -0
- package/dist/esm/plugins/serverBuild.mjs +48 -0
- package/dist/esm/plugins/serverRuntime.mjs +15 -0
- package/dist/esm/run/index.mjs +60 -0
- package/dist/esm/types/index.mjs +1 -0
- package/dist/esm/utils/config.mjs +11 -0
- package/dist/esm/utils/createServer.mjs +12 -0
- package/dist/esm/utils/env.mjs +12 -0
- package/dist/esm/utils/generateWatchFiles.mjs +10 -0
- package/dist/esm/utils/getConfigFile.mjs +5 -0
- package/dist/esm/utils/getSelectedEntries.mjs +26 -0
- package/dist/esm/utils/initAppContext.mjs +26 -0
- package/dist/esm/utils/loadPlugins.mjs +45 -0
- package/dist/esm/utils/printInstructions.mjs +9 -0
- package/dist/esm/utils/register.mjs +75 -0
- package/dist/esm/utils/restart.mjs +18 -0
- package/dist/esm/utils/routes.mjs +15 -0
- package/dist/esm-node/builder/builder-rspack/index.mjs +6 -0
- package/dist/esm-node/builder/generator/adapterCopy.mjs +35 -0
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.mjs +59 -0
- package/dist/esm-node/builder/generator/createCopyPattern.mjs +30 -0
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +56 -0
- package/dist/esm-node/builder/generator/index.mjs +45 -0
- package/dist/esm-node/builder/index.mjs +7 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +78 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.mjs +55 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +117 -0
- package/dist/esm-node/builder/shared/builderPlugins/builderHooks.mjs +17 -0
- package/dist/esm-node/builder/shared/builderPlugins/index.mjs +4 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.mjs +37 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +22 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +157 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +3 -0
- package/dist/esm-node/builder/shared/createCopyInfo.mjs +15 -0
- package/dist/esm-node/builder/shared/index.mjs +3 -0
- package/dist/esm-node/builder/shared/loaders/serverModuleLoader.mjs +5 -0
- package/dist/esm-node/commands/build.mjs +68 -0
- package/dist/esm-node/commands/deploy.mjs +10 -0
- package/dist/esm-node/commands/dev.mjs +82 -0
- package/dist/esm-node/commands/index.mjs +37 -0
- package/dist/esm-node/commands/inspect.mjs +15 -0
- package/dist/esm-node/commands/serve.mjs +47 -0
- package/dist/esm-node/compat/hooks.mjs +67 -0
- package/dist/esm-node/compat/index.mjs +28 -0
- package/dist/esm-node/compat/utils.mjs +95 -0
- package/dist/esm-node/config/default.mjs +90 -0
- package/dist/esm-node/config/index.mjs +2 -0
- package/dist/esm-node/config/initialize/index.mjs +7 -0
- package/dist/esm-node/config/initialize/inits.mjs +54 -0
- package/dist/esm-node/constants.mjs +3 -0
- package/dist/esm-node/defineConfig.mjs +2 -0
- package/dist/esm-node/esm/esbuild-loader.mjs +18 -29
- package/dist/esm-node/esm/register-esm.mjs +45 -57
- package/dist/esm-node/esm/ts-node-loader.mjs +18 -30
- package/dist/esm-node/esm/utils.mjs +31 -42
- package/dist/esm-node/index.mjs +121 -0
- package/dist/esm-node/locale/en.mjs +42 -0
- package/dist/esm-node/locale/index.mjs +9 -0
- package/dist/esm-node/locale/zh.mjs +42 -0
- package/dist/esm-node/plugins/analyze/constants.mjs +8 -0
- package/dist/esm-node/plugins/analyze/getBundleEntry.mjs +53 -0
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.mjs +66 -0
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +85 -0
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +130 -0
- package/dist/esm-node/plugins/analyze/index.mjs +193 -0
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +41 -0
- package/dist/esm-node/plugins/analyze/{templates.js → templates.mjs} +5 -7
- package/dist/esm-node/plugins/analyze/utils.mjs +55 -0
- package/dist/esm-node/plugins/deploy/index.mjs +38 -0
- package/dist/esm-node/plugins/deploy/platforms/gh-pages.mjs +43 -0
- package/dist/esm-node/plugins/deploy/platforms/netlify-entry.mjs +2 -1
- package/dist/esm-node/plugins/deploy/platforms/netlify-handler.mjs +85 -0
- package/dist/esm-node/plugins/deploy/platforms/netlify.mjs +111 -0
- package/dist/esm-node/plugins/deploy/platforms/node-entry.mjs +68 -0
- package/dist/esm-node/plugins/deploy/platforms/node.mjs +77 -0
- package/dist/esm-node/plugins/deploy/platforms/vercel-entry.mjs +3 -3
- package/dist/esm-node/plugins/deploy/platforms/vercel-handler.mjs +85 -0
- package/dist/esm-node/plugins/deploy/platforms/vercel.mjs +131 -0
- package/dist/esm-node/plugins/deploy/utils.mjs +39 -0
- package/dist/esm-node/plugins/initialize/index.mjs +59 -0
- package/dist/esm-node/plugins/serverBuild.mjs +48 -0
- package/dist/esm-node/plugins/serverRuntime.mjs +15 -0
- package/dist/esm-node/run/index.mjs +60 -0
- package/dist/esm-node/types/config/index.mjs +1 -0
- package/dist/esm-node/types/index.mjs +1 -0
- package/dist/esm-node/utils/config.mjs +11 -0
- package/dist/esm-node/utils/createServer.mjs +12 -0
- package/dist/esm-node/utils/env.mjs +12 -0
- package/dist/esm-node/utils/generateWatchFiles.mjs +10 -0
- package/dist/esm-node/utils/getConfigFile.mjs +5 -0
- package/dist/esm-node/utils/getSelectedEntries.mjs +26 -0
- package/dist/esm-node/utils/initAppContext.mjs +26 -0
- package/dist/esm-node/utils/loadPlugins.mjs +45 -0
- package/dist/esm-node/utils/printInstructions.mjs +9 -0
- package/dist/esm-node/utils/register.mjs +75 -0
- package/dist/esm-node/utils/restart.mjs +18 -0
- package/dist/esm-node/utils/routes.mjs +15 -0
- package/dist/types/builder/builder-rspack/index.d.ts +1 -1
- package/dist/types/builder/generator/adapterCopy.d.ts +2 -3
- package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +3 -3
- package/dist/types/builder/generator/createCopyPattern.d.ts +5 -5
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +4 -4
- package/dist/types/builder/generator/index.d.ts +2 -3
- package/dist/types/builder/index.d.ts +2 -2
- package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +1 -2
- package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +1 -2
- package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +1 -2
- package/dist/types/builder/shared/builderPlugins/builderHooks.d.ts +1 -2
- package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +4 -4
- package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +4 -4
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +3 -5
- package/dist/types/builder/shared/createCopyInfo.d.ts +4 -3
- package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +2 -2
- package/dist/types/builder/shared/types.d.ts +5 -5
- package/dist/types/commands/build.d.ts +2 -2
- package/dist/types/commands/deploy.d.ts +2 -2
- package/dist/types/commands/dev.d.ts +2 -2
- package/dist/types/commands/index.d.ts +7 -9
- package/dist/types/commands/inspect.d.ts +2 -2
- package/dist/types/commands/serve.d.ts +2 -2
- package/dist/types/compat/hooks.d.ts +2 -2
- package/dist/types/compat/index.d.ts +2 -2
- package/dist/types/config/default.d.ts +3 -4
- package/dist/types/config/index.d.ts +0 -1
- package/dist/types/config/initialize/index.d.ts +2 -2
- package/dist/types/config/initialize/inits.d.ts +3 -4
- package/dist/types/constants.d.ts +0 -3
- package/dist/types/defineConfig.d.ts +7 -8
- package/dist/types/exports/server.d.ts +1 -5
- package/dist/types/index.d.ts +4 -5
- package/dist/types/locale/index.d.ts +1 -1
- package/dist/types/plugins/analyze/constants.d.ts +0 -1
- package/dist/types/plugins/analyze/getBundleEntry.d.ts +2 -2
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +2 -2
- package/dist/types/plugins/analyze/getHtmlTemplate.d.ts +4 -4
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +3 -3
- package/dist/types/plugins/analyze/index.d.ts +2 -4
- package/dist/types/plugins/deploy/index.d.ts +2 -2
- package/dist/types/plugins/deploy/platforms/platform.d.ts +2 -2
- package/dist/types/plugins/deploy/utils.d.ts +2 -2
- package/dist/types/plugins/initialize/index.d.ts +2 -4
- package/dist/types/plugins/serverBuild.d.ts +2 -2
- package/dist/types/plugins/serverRuntime.d.ts +2 -2
- package/dist/types/run/index.d.ts +3 -8
- package/dist/types/types/config/deploy.d.ts +0 -1
- package/dist/types/types/config/dev.d.ts +50 -9
- package/dist/types/types/config/experiments.d.ts +2 -2
- package/dist/types/types/config/html.d.ts +2 -2
- package/dist/types/types/config/index.d.ts +10 -14
- package/dist/types/types/config/output.d.ts +8 -8
- package/dist/types/types/config/performance.d.ts +2 -2
- package/dist/types/types/config/resolve.d.ts +2 -2
- package/dist/types/types/config/security.d.ts +2 -2
- package/dist/types/types/config/source.d.ts +2 -23
- package/dist/types/types/config/tools.d.ts +5 -22
- package/dist/types/types/index.d.ts +7 -34
- package/dist/types/types/{new.d.ts → plugin.d.ts} +10 -39
- package/dist/types/types/utils.d.ts +0 -6
- package/dist/types/utils/config.d.ts +1 -11
- package/dist/types/utils/createServer.d.ts +1 -3
- package/dist/types/utils/env.d.ts +2 -2
- package/dist/types/utils/generateWatchFiles.d.ts +2 -3
- package/dist/types/utils/initAppContext.d.ts +1 -3
- package/dist/types/utils/loadPlugins.d.ts +5 -5
- package/dist/types/utils/printInstructions.d.ts +2 -2
- package/dist/types/utils/restart.d.ts +2 -2
- package/dist/types/utils/routes.d.ts +2 -3
- package/lib/types.d.ts +5 -16
- package/package.json +51 -38
- package/rslib.config.mts +20 -0
- package/dist/cjs/builder/builder-webpack/index.js +0 -50
- package/dist/cjs/config/legacy/createHtmlConfig.js +0 -45
- package/dist/cjs/config/legacy/createOutputConfig.js +0 -69
- package/dist/cjs/config/legacy/createSourceConfig.js +0 -53
- package/dist/cjs/config/legacy/createToolsConfig.js +0 -52
- package/dist/cjs/config/legacy/index.js +0 -68
- package/dist/cjs/plugins/deploy/platforms/netlify-entry.mjs +0 -1
- package/dist/cjs/plugins/deploy/platforms/vercel-entry.mjs +0 -3
- package/dist/cjs/types/hooks.js +0 -16
- package/dist/cjs/types/legacyConfig/deploy.js +0 -16
- package/dist/cjs/types/legacyConfig/dev.js +0 -16
- package/dist/cjs/types/legacyConfig/index.js +0 -16
- package/dist/cjs/types/legacyConfig/output.js +0 -16
- package/dist/cjs/types/legacyConfig/source.js +0 -16
- package/dist/cjs/types/legacyConfig/testing.js +0 -16
- package/dist/cjs/types/legacyConfig/tools.js +0 -16
- package/dist/cjs/types/new.js +0 -16
- package/dist/cjs/utils/getUserConfig.js +0 -34
- package/dist/esm/builder/builder-rspack/index.js +0 -30
- package/dist/esm/builder/builder-webpack/index.js +0 -48
- package/dist/esm/builder/generator/adapterCopy.js +0 -29
- package/dist/esm/builder/generator/createBuilderProviderConfig.js +0 -56
- package/dist/esm/builder/generator/createCopyPattern.js +0 -43
- package/dist/esm/builder/generator/getBuilderEnvironments.js +0 -89
- package/dist/esm/builder/generator/index.js +0 -116
- package/dist/esm/builder/index.js +0 -50
- package/dist/esm/builder/shared/builderPlugins/adapterBasic.js +0 -92
- package/dist/esm/builder/shared/builderPlugins/adapterHtml.js +0 -126
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +0 -262
- package/dist/esm/builder/shared/builderPlugins/builderHooks.js +0 -120
- package/dist/esm/builder/shared/builderPlugins/index.js +0 -4
- package/dist/esm/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -51
- package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -37
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.js +0 -420
- package/dist/esm/builder/shared/bundlerPlugins/index.js +0 -3
- package/dist/esm/builder/shared/createCopyInfo.js +0 -14
- package/dist/esm/builder/shared/index.js +0 -3
- package/dist/esm/builder/shared/loaders/serverModuleLoader.js +0 -7
- package/dist/esm/commands/build.js +0 -142
- package/dist/esm/commands/deploy.js +0 -48
- package/dist/esm/commands/dev.js +0 -197
- package/dist/esm/commands/index.js +0 -401
- package/dist/esm/commands/inspect.js +0 -31
- package/dist/esm/commands/serve.js +0 -96
- package/dist/esm/compat/hooks.js +0 -503
- package/dist/esm/compat/index.js +0 -45
- package/dist/esm/compat/utils.js +0 -100
- package/dist/esm/config/default.js +0 -205
- package/dist/esm/config/index.js +0 -3
- package/dist/esm/config/initialize/index.js +0 -9
- package/dist/esm/config/initialize/inits.js +0 -89
- package/dist/esm/config/legacy/createHtmlConfig.js +0 -21
- package/dist/esm/config/legacy/createOutputConfig.js +0 -45
- package/dist/esm/config/legacy/createSourceConfig.js +0 -46
- package/dist/esm/config/legacy/createToolsConfig.js +0 -28
- package/dist/esm/config/legacy/index.js +0 -43
- package/dist/esm/constants.js +0 -12
- package/dist/esm/defineConfig.js +0 -16
- package/dist/esm/exports/server.js +0 -4
- package/dist/esm/index.js +0 -265
- package/dist/esm/locale/en.js +0 -44
- package/dist/esm/locale/index.js +0 -12
- package/dist/esm/locale/zh.js +0 -44
- package/dist/esm/plugins/analyze/constants.js +0 -14
- package/dist/esm/plugins/analyze/getBundleEntry.js +0 -108
- package/dist/esm/plugins/analyze/getFileSystemEntry.js +0 -268
- package/dist/esm/plugins/analyze/getHtmlTemplate.js +0 -251
- package/dist/esm/plugins/analyze/getServerRoutes.js +0 -148
- package/dist/esm/plugins/analyze/index.js +0 -439
- package/dist/esm/plugins/analyze/isDefaultExportFunction.js +0 -49
- package/dist/esm/plugins/analyze/templates.js +0 -6
- package/dist/esm/plugins/analyze/utils.js +0 -106
- package/dist/esm/plugins/deploy/index.js +0 -133
- package/dist/esm/plugins/deploy/platforms/gh-pages.js +0 -184
- package/dist/esm/plugins/deploy/platforms/netlify-entry.js +0 -11
- package/dist/esm/plugins/deploy/platforms/netlify-handler.js +0 -207
- package/dist/esm/plugins/deploy/platforms/netlify.js +0 -346
- package/dist/esm/plugins/deploy/platforms/node-entry.js +0 -110
- package/dist/esm/plugins/deploy/platforms/node.js +0 -178
- package/dist/esm/plugins/deploy/platforms/vercel-entry.js +0 -11
- package/dist/esm/plugins/deploy/platforms/vercel-handler.js +0 -207
- package/dist/esm/plugins/deploy/platforms/vercel.js +0 -280
- package/dist/esm/plugins/deploy/utils.js +0 -59
- package/dist/esm/plugins/initialize/index.js +0 -116
- package/dist/esm/plugins/serverBuild.js +0 -83
- package/dist/esm/plugins/serverRuntime.js +0 -22
- package/dist/esm/run/index.js +0 -134
- package/dist/esm/types/config/index.js +0 -1
- package/dist/esm/types/config/source.js +0 -0
- package/dist/esm/types/config/testing.js +0 -0
- package/dist/esm/types/config/tools.js +0 -0
- package/dist/esm/types/hooks.js +0 -0
- package/dist/esm/types/index.js +0 -3
- package/dist/esm/types/legacyConfig/deploy.js +0 -0
- package/dist/esm/types/legacyConfig/dev.js +0 -0
- package/dist/esm/types/legacyConfig/index.js +0 -0
- package/dist/esm/types/legacyConfig/output.js +0 -0
- package/dist/esm/types/legacyConfig/source.js +0 -0
- package/dist/esm/types/legacyConfig/testing.js +0 -0
- package/dist/esm/types/legacyConfig/tools.js +0 -0
- package/dist/esm/types/new.js +0 -0
- package/dist/esm/types/utils.js +0 -0
- package/dist/esm/utils/config.js +0 -122
- package/dist/esm/utils/createServer.js +0 -58
- package/dist/esm/utils/env.js +0 -16
- package/dist/esm/utils/generateWatchFiles.js +0 -71
- package/dist/esm/utils/getConfigFile.js +0 -11
- package/dist/esm/utils/getSelectedEntries.js +0 -67
- package/dist/esm/utils/getUserConfig.js +0 -32
- package/dist/esm/utils/initAppContext.js +0 -30
- package/dist/esm/utils/loadPlugins.js +0 -162
- package/dist/esm/utils/printInstructions.js +0 -32
- package/dist/esm/utils/register.js +0 -182
- package/dist/esm/utils/restart.js +0 -68
- package/dist/esm/utils/routes.js +0 -42
- package/dist/esm/utils/types.js +0 -0
- package/dist/esm-node/builder/builder-rspack/index.js +0 -8
- package/dist/esm-node/builder/builder-webpack/index.js +0 -16
- package/dist/esm-node/builder/generator/adapterCopy.js +0 -26
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.js +0 -67
- package/dist/esm-node/builder/generator/createCopyPattern.js +0 -41
- package/dist/esm-node/builder/generator/getBuilderEnvironments.js +0 -68
- package/dist/esm-node/builder/generator/index.js +0 -60
- package/dist/esm-node/builder/index.js +0 -16
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.js +0 -55
- package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.js +0 -60
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +0 -151
- package/dist/esm-node/builder/shared/builderPlugins/builderHooks.js +0 -26
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -30
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -31
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.js +0 -305
- package/dist/esm-node/builder/shared/createCopyInfo.js +0 -14
- package/dist/esm-node/builder/shared/loaders/serverModuleLoader.js +0 -7
- package/dist/esm-node/commands/build.js +0 -67
- package/dist/esm-node/commands/deploy.js +0 -12
- package/dist/esm-node/commands/dev.js +0 -111
- package/dist/esm-node/commands/index.js +0 -90
- package/dist/esm-node/commands/inspect.js +0 -19
- package/dist/esm-node/commands/serve.js +0 -54
- package/dist/esm-node/compat/hooks.js +0 -159
- package/dist/esm-node/compat/index.js +0 -40
- package/dist/esm-node/compat/utils.js +0 -100
- package/dist/esm-node/config/default.js +0 -206
- package/dist/esm-node/config/initialize/index.js +0 -9
- package/dist/esm-node/config/initialize/inits.js +0 -79
- package/dist/esm-node/config/legacy/createHtmlConfig.js +0 -21
- package/dist/esm-node/config/legacy/createOutputConfig.js +0 -45
- package/dist/esm-node/config/legacy/createSourceConfig.js +0 -29
- package/dist/esm-node/config/legacy/createToolsConfig.js +0 -28
- package/dist/esm-node/config/legacy/index.js +0 -43
- package/dist/esm-node/constants.js +0 -12
- package/dist/esm-node/defineConfig.js +0 -13
- package/dist/esm-node/exports/server.js +0 -4
- package/dist/esm-node/index.js +0 -160
- package/dist/esm-node/locale/en.js +0 -44
- package/dist/esm-node/locale/index.js +0 -12
- package/dist/esm-node/locale/zh.js +0 -44
- package/dist/esm-node/plugins/analyze/constants.js +0 -14
- package/dist/esm-node/plugins/analyze/getBundleEntry.js +0 -67
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +0 -108
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.js +0 -99
- package/dist/esm-node/plugins/analyze/getServerRoutes.js +0 -146
- package/dist/esm-node/plugins/analyze/index.js +0 -184
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.js +0 -47
- package/dist/esm-node/plugins/analyze/utils.js +0 -73
- package/dist/esm-node/plugins/deploy/index.js +0 -44
- package/dist/esm-node/plugins/deploy/platforms/gh-pages.js +0 -57
- package/dist/esm-node/plugins/deploy/platforms/netlify-entry.js +0 -11
- package/dist/esm-node/plugins/deploy/platforms/netlify-handler.js +0 -73
- package/dist/esm-node/plugins/deploy/platforms/netlify.js +0 -133
- package/dist/esm-node/plugins/deploy/platforms/node-entry.js +0 -46
- package/dist/esm-node/plugins/deploy/platforms/node.js +0 -87
- package/dist/esm-node/plugins/deploy/platforms/vercel-entry.js +0 -11
- package/dist/esm-node/plugins/deploy/platforms/vercel-handler.js +0 -73
- package/dist/esm-node/plugins/deploy/platforms/vercel.js +0 -145
- package/dist/esm-node/plugins/deploy/utils.js +0 -55
- package/dist/esm-node/plugins/initialize/index.js +0 -78
- package/dist/esm-node/plugins/serverBuild.js +0 -56
- package/dist/esm-node/plugins/serverRuntime.js +0 -17
- package/dist/esm-node/run/index.js +0 -104
- package/dist/esm-node/types/index.js +0 -3
- package/dist/esm-node/utils/config.js +0 -49
- package/dist/esm-node/utils/createServer.js +0 -26
- package/dist/esm-node/utils/env.js +0 -16
- package/dist/esm-node/utils/generateWatchFiles.js +0 -30
- package/dist/esm-node/utils/getConfigFile.js +0 -7
- package/dist/esm-node/utils/getSelectedEntries.js +0 -34
- package/dist/esm-node/utils/getUserConfig.js +0 -10
- package/dist/esm-node/utils/initAppContext.js +0 -29
- package/dist/esm-node/utils/loadPlugins.js +0 -52
- package/dist/esm-node/utils/printInstructions.js +0 -11
- package/dist/esm-node/utils/register.js +0 -94
- package/dist/esm-node/utils/restart.js +0 -23
- package/dist/esm-node/utils/routes.js +0 -21
- package/dist/types/builder/builder-webpack/index.d.ts +0 -2
- package/dist/types/config/legacy/createHtmlConfig.d.ts +0 -2
- package/dist/types/config/legacy/createOutputConfig.d.ts +0 -2
- package/dist/types/config/legacy/createSourceConfig.d.ts +0 -2
- package/dist/types/config/legacy/createToolsConfig.d.ts +0 -2
- package/dist/types/config/legacy/index.d.ts +0 -3
- package/dist/types/types/hooks.d.ts +0 -69
- package/dist/types/types/legacyConfig/deploy.d.ts +0 -8
- package/dist/types/types/legacyConfig/dev.d.ts +0 -12
- package/dist/types/types/legacyConfig/index.d.ts +0 -35
- package/dist/types/types/legacyConfig/output.d.ts +0 -50
- package/dist/types/types/legacyConfig/source.d.ts +0 -28
- package/dist/types/types/legacyConfig/testing.d.ts +0 -8
- package/dist/types/types/legacyConfig/tools.d.ts +0 -15
- package/dist/types/utils/getUserConfig.d.ts +0 -6
- /package/dist/{esm-node/builder/shared/builderPlugins/index.js → esm/builder/shared/builderPlugins/index.mjs} +0 -0
- /package/dist/{esm-node/builder/shared/bundlerPlugins/index.js → esm/builder/shared/bundlerPlugins/index.mjs} +0 -0
- /package/dist/{esm-node/builder/shared/index.js → esm/builder/shared/index.mjs} +0 -0
- /package/dist/{esm-node/types/legacyConfig/output.js → esm/builder/shared/types.mjs} +0 -0
- /package/dist/{esm-node/types/legacyConfig/source.js → esm/exports/server.mjs} +0 -0
- /package/dist/{esm-node/types/legacyConfig/testing.js → esm/plugins/deploy/platforms/platform.mjs} +0 -0
- /package/dist/{esm-node/types/legacyConfig/tools.js → esm/types/config/deploy.mjs} +0 -0
- /package/dist/{esm-node/types/new.js → esm/types/config/dev.mjs} +0 -0
- /package/dist/{esm-node/types/utils.js → esm/types/config/experiments.mjs} +0 -0
- /package/dist/{esm-node/utils/types.js → esm/types/config/html.mjs} +0 -0
- /package/dist/{esm-node/types/config/index.js → esm/types/config/index.mjs} +0 -0
- /package/dist/esm/{builder/shared/types.js → types/config/output.mjs} +0 -0
- /package/dist/esm/{plugins/deploy/platforms/platform.js → types/config/performance.mjs} +0 -0
- /package/dist/esm/types/config/{deploy.js → resolve.mjs} +0 -0
- /package/dist/esm/types/config/{dev.js → security.mjs} +0 -0
- /package/dist/esm/types/config/{experiments.js → source.mjs} +0 -0
- /package/dist/esm/types/config/{html.js → testing.mjs} +0 -0
- /package/dist/esm/types/config/{output.js → tools.mjs} +0 -0
- /package/dist/esm/types/{config/performance.js → plugin.mjs} +0 -0
- /package/dist/esm/types/{config/resolve.js → utils.mjs} +0 -0
- /package/dist/esm/{types/config/security.js → utils/types.mjs} +0 -0
- /package/dist/esm-node/builder/shared/{types.js → types.mjs} +0 -0
- /package/dist/esm-node/{plugins/deploy/platforms/platform.js → exports/server.mjs} +0 -0
- /package/dist/esm-node/{types/config/deploy.js → plugins/deploy/platforms/platform.mjs} +0 -0
- /package/dist/esm-node/types/config/{dev.js → deploy.mjs} +0 -0
- /package/dist/esm-node/types/config/{experiments.js → dev.mjs} +0 -0
- /package/dist/esm-node/types/config/{html.js → experiments.mjs} +0 -0
- /package/dist/esm-node/types/config/{output.js → html.mjs} +0 -0
- /package/dist/esm-node/types/config/{performance.js → output.mjs} +0 -0
- /package/dist/esm-node/types/config/{resolve.js → performance.mjs} +0 -0
- /package/dist/esm-node/types/config/{security.js → resolve.mjs} +0 -0
- /package/dist/esm-node/types/config/{source.js → security.mjs} +0 -0
- /package/dist/esm-node/types/config/{testing.js → source.mjs} +0 -0
- /package/dist/esm-node/types/config/{tools.js → testing.mjs} +0 -0
- /package/dist/esm-node/types/{hooks.js → config/tools.mjs} +0 -0
- /package/dist/esm-node/types/{legacyConfig/deploy.js → plugin.mjs} +0 -0
- /package/dist/esm-node/types/{legacyConfig/dev.js → utils.mjs} +0 -0
- /package/dist/esm-node/{types/legacyConfig/index.js → utils/types.mjs} +0 -0
package/dist/esm/compat/utils.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { getModifyHtmlPartials } from "../plugins/analyze/getHtmlTemplate";
|
|
2
|
-
function transformHookRunner(hookRunnerName) {
|
|
3
|
-
switch (hookRunnerName) {
|
|
4
|
-
case "beforeConfig":
|
|
5
|
-
console.error("The `beforeConfig` hook has been deprecated. Please define your code directly in the setup function instead.");
|
|
6
|
-
return void 0;
|
|
7
|
-
case "prepare":
|
|
8
|
-
return "onPrepare";
|
|
9
|
-
case "afterPrepare":
|
|
10
|
-
return "onAfterPrepare";
|
|
11
|
-
case "beforeGenerateRoutes":
|
|
12
|
-
return "onBeforeGenerateRoutes";
|
|
13
|
-
case "beforePrintInstructions":
|
|
14
|
-
return "onBeforePrintInstructions";
|
|
15
|
-
case "resolvedConfig":
|
|
16
|
-
return "modifyResolvedConfig";
|
|
17
|
-
case "commands":
|
|
18
|
-
return "addCommand";
|
|
19
|
-
case "watchFiles":
|
|
20
|
-
return "addWatchFiles";
|
|
21
|
-
case "fileChange":
|
|
22
|
-
return "onFileChanged";
|
|
23
|
-
case "beforeCreateCompiler":
|
|
24
|
-
return "onBeforeCreateCompiler";
|
|
25
|
-
case "afterCreateCompiler":
|
|
26
|
-
return "onAfterCreateCompiler";
|
|
27
|
-
case "beforeBuild":
|
|
28
|
-
return "onBeforeBuild";
|
|
29
|
-
case "afterBuild":
|
|
30
|
-
return "onAfterBuild";
|
|
31
|
-
case "beforeDev":
|
|
32
|
-
return "onBeforeDev";
|
|
33
|
-
case "afterDev":
|
|
34
|
-
return "onDevCompileDone";
|
|
35
|
-
case "beforeDeploy":
|
|
36
|
-
return "onBeforeDeploy";
|
|
37
|
-
case "afterDeploy":
|
|
38
|
-
return "onAfterDeploy";
|
|
39
|
-
case "beforeExit":
|
|
40
|
-
return "onBeforeExit";
|
|
41
|
-
case "beforeRestart":
|
|
42
|
-
return "onBeforeRestart";
|
|
43
|
-
case "htmlPartials":
|
|
44
|
-
return "modifyHtmlPartials";
|
|
45
|
-
default:
|
|
46
|
-
return hookRunnerName;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function transformHookParams(hookRunnerName, params) {
|
|
50
|
-
switch (hookRunnerName) {
|
|
51
|
-
case "resolvedConfig":
|
|
52
|
-
return {
|
|
53
|
-
isMultiple: false,
|
|
54
|
-
params: {
|
|
55
|
-
resolved: params[0]
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
case "htmlPartials":
|
|
59
|
-
return {
|
|
60
|
-
isMultiple: false,
|
|
61
|
-
params: {
|
|
62
|
-
partials: {
|
|
63
|
-
top: params[0].partials.top.current,
|
|
64
|
-
head: params[0].partials.head.current,
|
|
65
|
-
body: params[0].partials.body.current
|
|
66
|
-
},
|
|
67
|
-
entrypoint: params[0].entrypoint
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
case "jestConfig": {
|
|
71
|
-
return {
|
|
72
|
-
isMultiple: true,
|
|
73
|
-
params
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
default:
|
|
77
|
-
return {
|
|
78
|
-
isMultiple: false,
|
|
79
|
-
params: params[0]
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function transformHookResult(hookRunnerName, result) {
|
|
84
|
-
switch (hookRunnerName) {
|
|
85
|
-
case "resolvedConfig":
|
|
86
|
-
return result.resolved;
|
|
87
|
-
case "htmlPartials":
|
|
88
|
-
return {
|
|
89
|
-
partials: getModifyHtmlPartials(result.partials),
|
|
90
|
-
entrypoint: result.entrypoint
|
|
91
|
-
};
|
|
92
|
-
default:
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
export {
|
|
97
|
-
transformHookParams,
|
|
98
|
-
transformHookResult,
|
|
99
|
-
transformHookRunner
|
|
100
|
-
};
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
|
-
import { MAIN_ENTRY_NAME } from "@modern-js/utils";
|
|
3
|
-
import { getAutoInjectEnv } from "../utils/env";
|
|
4
|
-
function createDefaultConfig(appContext) {
|
|
5
|
-
var dev = {
|
|
6
|
-
// `dev.port` should not have a default value
|
|
7
|
-
// because we will use `server.port` by default
|
|
8
|
-
port: void 0,
|
|
9
|
-
cliShortcuts: {
|
|
10
|
-
help: false,
|
|
11
|
-
// does not support restart server and print urls yet
|
|
12
|
-
custom: function() {
|
|
13
|
-
var shortcuts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
14
|
-
return shortcuts.filter(function(param) {
|
|
15
|
-
var key = param.key;
|
|
16
|
-
return key !== "r" && key !== "u";
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
var output = {
|
|
22
|
-
distPath: {
|
|
23
|
-
root: "dist",
|
|
24
|
-
html: "html",
|
|
25
|
-
js: "static/js",
|
|
26
|
-
css: "static/css",
|
|
27
|
-
server: "bundles",
|
|
28
|
-
worker: "worker"
|
|
29
|
-
},
|
|
30
|
-
cleanDistPath: true,
|
|
31
|
-
disableNodePolyfill: true,
|
|
32
|
-
enableInlineRouteManifests: true,
|
|
33
|
-
disableInlineRouteManifests: false
|
|
34
|
-
};
|
|
35
|
-
var source = {
|
|
36
|
-
entries: void 0,
|
|
37
|
-
mainEntryName: MAIN_ENTRY_NAME,
|
|
38
|
-
enableAsyncEntry: false,
|
|
39
|
-
enableCustomEntry: false,
|
|
40
|
-
disableDefaultEntries: false,
|
|
41
|
-
entriesDir: "./src",
|
|
42
|
-
configDir: "./config",
|
|
43
|
-
globalVars: getAutoInjectEnv(appContext),
|
|
44
|
-
alias: {}
|
|
45
|
-
};
|
|
46
|
-
var _obj;
|
|
47
|
-
var resolve = {
|
|
48
|
-
alias: (_obj = {}, _define_property(_obj, appContext.internalDirAlias, appContext.internalDirectory), _define_property(_obj, appContext.internalSrcAlias, appContext.srcDirectory), _define_property(_obj, "@", appContext.srcDirectory), _define_property(_obj, "@shared", appContext.sharedDirectory), _obj)
|
|
49
|
-
};
|
|
50
|
-
var html = {
|
|
51
|
-
title: "",
|
|
52
|
-
mountId: "root",
|
|
53
|
-
meta: {
|
|
54
|
-
charset: {
|
|
55
|
-
charset: "utf-8"
|
|
56
|
-
},
|
|
57
|
-
viewport: "width=device-width, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no",
|
|
58
|
-
"http-equiv": {
|
|
59
|
-
"http-equiv": "x-ua-compatible",
|
|
60
|
-
content: "ie=edge"
|
|
61
|
-
},
|
|
62
|
-
renderer: "webkit",
|
|
63
|
-
layoutmode: "standard",
|
|
64
|
-
imagemode: "force",
|
|
65
|
-
"wap-font-scale": "no",
|
|
66
|
-
"format-detection": "telephone=no"
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var server = {
|
|
70
|
-
routes: void 0,
|
|
71
|
-
publicRoutes: void 0,
|
|
72
|
-
ssr: void 0,
|
|
73
|
-
ssrByEntries: void 0,
|
|
74
|
-
baseUrl: "/",
|
|
75
|
-
port: 8080
|
|
76
|
-
};
|
|
77
|
-
return {
|
|
78
|
-
source,
|
|
79
|
-
resolve,
|
|
80
|
-
output,
|
|
81
|
-
server,
|
|
82
|
-
dev,
|
|
83
|
-
html,
|
|
84
|
-
tools: {
|
|
85
|
-
tsChecker: {
|
|
86
|
-
issue: {
|
|
87
|
-
exclude: [
|
|
88
|
-
{
|
|
89
|
-
file: "**/api/lambda/**/*"
|
|
90
|
-
}
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
plugins: [],
|
|
96
|
-
builderPlugins: [],
|
|
97
|
-
runtime: {},
|
|
98
|
-
runtimeByEntries: {}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function createLegacyDefaultConfig(appContext) {
|
|
102
|
-
var _obj;
|
|
103
|
-
var defaultAlias = appContext ? (_obj = {}, _define_property(_obj, appContext.internalDirAlias, appContext.internalDirectory), _define_property(_obj, appContext.internalSrcAlias, appContext.srcDirectory), _define_property(_obj, "@", appContext.srcDirectory), _define_property(_obj, "@shared", appContext.sharedDirectory), _obj) : {};
|
|
104
|
-
var sourceDefaults = {
|
|
105
|
-
entries: void 0,
|
|
106
|
-
mainEntryName: MAIN_ENTRY_NAME,
|
|
107
|
-
enableAsyncEntry: false,
|
|
108
|
-
enableCustomEntry: false,
|
|
109
|
-
disableDefaultEntries: false,
|
|
110
|
-
entriesDir: "./src",
|
|
111
|
-
configDir: "./config",
|
|
112
|
-
apiDir: "./api",
|
|
113
|
-
envVars: [],
|
|
114
|
-
globalVars: getAutoInjectEnv(appContext),
|
|
115
|
-
alias: defaultAlias,
|
|
116
|
-
moduleScopes: void 0,
|
|
117
|
-
include: []
|
|
118
|
-
};
|
|
119
|
-
var outputDefaults = {
|
|
120
|
-
assetPrefix: "/",
|
|
121
|
-
htmlPath: "html",
|
|
122
|
-
jsPath: "static/js",
|
|
123
|
-
cssPath: "static/css",
|
|
124
|
-
mediaPath: "static/media",
|
|
125
|
-
path: "dist",
|
|
126
|
-
title: "",
|
|
127
|
-
titleByEntries: void 0,
|
|
128
|
-
meta: {
|
|
129
|
-
charset: {
|
|
130
|
-
charset: "utf-8"
|
|
131
|
-
},
|
|
132
|
-
viewport: "width=device-width, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no",
|
|
133
|
-
"http-equiv": {
|
|
134
|
-
"http-equiv": "x-ua-compatible",
|
|
135
|
-
content: "ie=edge"
|
|
136
|
-
},
|
|
137
|
-
renderer: "webkit",
|
|
138
|
-
layoutmode: "standard",
|
|
139
|
-
imagemode: "force",
|
|
140
|
-
"wap-font-scale": "no",
|
|
141
|
-
"format-detection": "telephone=no"
|
|
142
|
-
},
|
|
143
|
-
metaByEntries: void 0,
|
|
144
|
-
inject: "head",
|
|
145
|
-
injectByEntries: void 0,
|
|
146
|
-
mountId: "root",
|
|
147
|
-
favicon: "",
|
|
148
|
-
faviconByEntries: void 0,
|
|
149
|
-
copy: void 0,
|
|
150
|
-
disableHtmlFolder: false,
|
|
151
|
-
disableCssModuleExtension: false,
|
|
152
|
-
disableCssExtract: false,
|
|
153
|
-
enableCssModuleTSDeclaration: false,
|
|
154
|
-
disableMinimize: false,
|
|
155
|
-
enableInlineStyles: false,
|
|
156
|
-
enableInlineScripts: false,
|
|
157
|
-
disableSourceMap: false,
|
|
158
|
-
disableInlineRuntimeChunk: false,
|
|
159
|
-
disableAssetsCache: false,
|
|
160
|
-
enableLatestDecorators: false,
|
|
161
|
-
polyfill: "entry",
|
|
162
|
-
dataUriLimit: 1e4,
|
|
163
|
-
templateParameters: {},
|
|
164
|
-
templateParametersByEntries: void 0,
|
|
165
|
-
cssModuleLocalIdentName: void 0,
|
|
166
|
-
disableNodePolyfill: false,
|
|
167
|
-
enableTsLoader: false
|
|
168
|
-
};
|
|
169
|
-
var serverDefaults = {
|
|
170
|
-
routes: void 0,
|
|
171
|
-
publicRoutes: void 0,
|
|
172
|
-
ssr: void 0,
|
|
173
|
-
ssrByEntries: void 0,
|
|
174
|
-
baseUrl: "/",
|
|
175
|
-
port: 8080
|
|
176
|
-
};
|
|
177
|
-
var devDefaults = {
|
|
178
|
-
assetPrefix: false,
|
|
179
|
-
https: false
|
|
180
|
-
};
|
|
181
|
-
var toolsDefaults = {
|
|
182
|
-
webpack: void 0,
|
|
183
|
-
babel: void 0,
|
|
184
|
-
postcss: void 0,
|
|
185
|
-
autoprefixer: void 0,
|
|
186
|
-
lodash: void 0,
|
|
187
|
-
devServer: void 0,
|
|
188
|
-
tsLoader: void 0,
|
|
189
|
-
terser: void 0,
|
|
190
|
-
minifyCss: void 0
|
|
191
|
-
};
|
|
192
|
-
return {
|
|
193
|
-
source: sourceDefaults,
|
|
194
|
-
output: outputDefaults,
|
|
195
|
-
server: serverDefaults,
|
|
196
|
-
dev: devDefaults,
|
|
197
|
-
tools: toolsDefaults,
|
|
198
|
-
runtime: {},
|
|
199
|
-
runtimeByEntries: {}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
export {
|
|
203
|
-
createDefaultConfig,
|
|
204
|
-
createLegacyDefaultConfig
|
|
205
|
-
};
|
package/dist/esm/config/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { initHtmlConfig, initSourceConfig } from "./inits";
|
|
2
|
-
function initialNormalizedConfig(config, appContext, bundler) {
|
|
3
|
-
initHtmlConfig(config, appContext);
|
|
4
|
-
initSourceConfig(config, appContext, bundler);
|
|
5
|
-
return config;
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
initialNormalizedConfig
|
|
9
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import path, { isAbsolute } from "path";
|
|
2
|
-
import { findExists } from "@modern-js/utils";
|
|
3
|
-
function initHtmlConfig(config, appContext) {
|
|
4
|
-
var ICON_EXTENSIONS = [
|
|
5
|
-
"png",
|
|
6
|
-
"jpg",
|
|
7
|
-
"jpeg",
|
|
8
|
-
"svg",
|
|
9
|
-
"ico"
|
|
10
|
-
];
|
|
11
|
-
config.html.appIcon = createBuilderAppIcon(config, appContext);
|
|
12
|
-
config.html.favicon = createBuilderFavicon(config, appContext);
|
|
13
|
-
return config.html;
|
|
14
|
-
function createBuilderAppIcon(config2, appContext2) {
|
|
15
|
-
var appIcon = config2.html.appIcon;
|
|
16
|
-
var configDir = config2.source.configDir;
|
|
17
|
-
var getDefaultAppIcon = function() {
|
|
18
|
-
return findExists(ICON_EXTENSIONS.map(function(ext) {
|
|
19
|
-
return path.resolve(appContext2.appDirectory, configDir || "./config", "icon.".concat(ext));
|
|
20
|
-
}));
|
|
21
|
-
};
|
|
22
|
-
return appIcon || getDefaultAppIcon() || void 0;
|
|
23
|
-
}
|
|
24
|
-
function createBuilderFavicon(config2, appContext2) {
|
|
25
|
-
var configDir = config2.source.configDir;
|
|
26
|
-
var favicon = config2.html.favicon;
|
|
27
|
-
var getDefaultFavicon = function() {
|
|
28
|
-
return findExists(ICON_EXTENSIONS.map(function(ext) {
|
|
29
|
-
return path.resolve(appContext2.appDirectory, configDir || "./config", "favicon.".concat(ext));
|
|
30
|
-
}));
|
|
31
|
-
};
|
|
32
|
-
return favicon || getDefaultFavicon() || void 0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function initSourceConfig(config, appContext, bundler) {
|
|
36
|
-
config.source.include = createBuilderInclude(config, appContext);
|
|
37
|
-
if (bundler === "webpack") {
|
|
38
|
-
config.source.moduleScopes = createBuilderModuleScope(config);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function createBuilderInclude(config, appContext) {
|
|
42
|
-
var include = config.source.include;
|
|
43
|
-
var defaultInclude = [
|
|
44
|
-
appContext.internalDirectory
|
|
45
|
-
];
|
|
46
|
-
var transformInclude = (include || []).map(function(include2) {
|
|
47
|
-
if (typeof include2 === "string") {
|
|
48
|
-
if (isAbsolute(include2)) {
|
|
49
|
-
return include2;
|
|
50
|
-
}
|
|
51
|
-
return new RegExp(include2);
|
|
52
|
-
}
|
|
53
|
-
return include2;
|
|
54
|
-
}).concat(defaultInclude);
|
|
55
|
-
return transformInclude;
|
|
56
|
-
}
|
|
57
|
-
function createBuilderModuleScope(config) {
|
|
58
|
-
var moduleScopes = config.source.moduleScopes;
|
|
59
|
-
if (moduleScopes) {
|
|
60
|
-
var DEFAULT_SCOPES = [
|
|
61
|
-
"./src",
|
|
62
|
-
"./shared",
|
|
63
|
-
/node_modules/
|
|
64
|
-
];
|
|
65
|
-
var builderModuleScope = applyScopeOptions(DEFAULT_SCOPES, moduleScopes);
|
|
66
|
-
return builderModuleScope;
|
|
67
|
-
} else {
|
|
68
|
-
return void 0;
|
|
69
|
-
}
|
|
70
|
-
function isPrimitiveScope(items) {
|
|
71
|
-
return items.every(function(item) {
|
|
72
|
-
return typeof item === "string" || Object.prototype.toString.call(item) === "[object RegExp]";
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function applyScopeOptions(defaults, options) {
|
|
76
|
-
if (Array.isArray(options)) {
|
|
77
|
-
if (isPrimitiveScope(options)) {
|
|
78
|
-
return defaults.concat(options);
|
|
79
|
-
}
|
|
80
|
-
return options.reduce(applyScopeOptions, defaults);
|
|
81
|
-
}
|
|
82
|
-
return options(defaults) || defaults;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
createBuilderModuleScope,
|
|
87
|
-
initHtmlConfig,
|
|
88
|
-
initSourceConfig
|
|
89
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function createHtmlConfig(config) {
|
|
2
|
-
var _config_output = config.output, disableHtmlFolder = _config_output.disableHtmlFolder, favicon = _config_output.favicon, faviconByEntries = _config_output.faviconByEntries, inject = _config_output.inject, injectByEntries = _config_output.injectByEntries, meta = _config_output.meta, metaByEntries = _config_output.metaByEntries, mountId = _config_output.mountId, title = _config_output.title, titleByEntries = _config_output.titleByEntries, templateParameters = _config_output.templateParameters, templateParametersByEntries = _config_output.templateParametersByEntries, crossorigin = _config_output.crossorigin;
|
|
3
|
-
return {
|
|
4
|
-
disableHtmlFolder,
|
|
5
|
-
favicon,
|
|
6
|
-
faviconByEntries,
|
|
7
|
-
inject,
|
|
8
|
-
injectByEntries,
|
|
9
|
-
meta,
|
|
10
|
-
metaByEntries,
|
|
11
|
-
mountId,
|
|
12
|
-
title,
|
|
13
|
-
titleByEntries,
|
|
14
|
-
crossorigin,
|
|
15
|
-
templateParameters,
|
|
16
|
-
templateParametersByEntries
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
createHtmlConfig
|
|
21
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function createOutputConfig(config) {
|
|
2
|
-
var _config_output = config.output, assetPrefix = _config_output.assetPrefix, copy = _config_output.copy, cssModuleLocalIdentName = _config_output.cssModuleLocalIdentName, cssPath = _config_output.cssPath, jsPath = _config_output.jsPath, htmlPath = _config_output.htmlPath, mediaPath = _config_output.mediaPath, enableTsLoader = _config_output.enableTsLoader, path = _config_output.path, disableInlineRuntimeChunk = _config_output.disableInlineRuntimeChunk, disableCssExtract = _config_output.disableCssExtract, disableMinimize = _config_output.disableMinimize, disableSourceMap = _config_output.disableSourceMap, disableTsChecker = _config_output.disableTsChecker, enableCssModuleTSDeclaration = _config_output.enableCssModuleTSDeclaration, enableInlineScripts = _config_output.enableInlineScripts, enableInlineStyles = _config_output.enableInlineStyles, polyfill = _config_output.polyfill, dataUriLimit = _config_output.dataUriLimit, disableAssetsCache = _config_output.disableAssetsCache, enableLatestDecorators = _config_output.enableLatestDecorators, disableCssModuleExtension = _config_output.disableCssModuleExtension, ssg = _config_output.ssg, disableNodePolyfill = _config_output.disableNodePolyfill;
|
|
3
|
-
return {
|
|
4
|
-
assetPrefix,
|
|
5
|
-
copy,
|
|
6
|
-
distPath: {
|
|
7
|
-
root: path,
|
|
8
|
-
css: cssPath,
|
|
9
|
-
js: jsPath,
|
|
10
|
-
html: htmlPath,
|
|
11
|
-
// modern.js v1 output all media files to `dist/media` by default
|
|
12
|
-
svg: mediaPath || "media",
|
|
13
|
-
image: mediaPath || "media",
|
|
14
|
-
font: mediaPath || "media",
|
|
15
|
-
media: mediaPath || "media"
|
|
16
|
-
},
|
|
17
|
-
dataUriLimit: {
|
|
18
|
-
svg: dataUriLimit,
|
|
19
|
-
image: dataUriLimit,
|
|
20
|
-
font: dataUriLimit,
|
|
21
|
-
media: dataUriLimit
|
|
22
|
-
},
|
|
23
|
-
cssModuleLocalIdentName,
|
|
24
|
-
disableCssExtract,
|
|
25
|
-
disableCssModuleExtension,
|
|
26
|
-
disableInlineRuntimeChunk,
|
|
27
|
-
disableMinimize,
|
|
28
|
-
disableSourceMap,
|
|
29
|
-
disableTsChecker: disableTsChecker || enableTsLoader,
|
|
30
|
-
enableCssModuleTSDeclaration,
|
|
31
|
-
enableInlineScripts,
|
|
32
|
-
enableInlineStyles,
|
|
33
|
-
polyfill,
|
|
34
|
-
disableFilenameHash: disableAssetsCache,
|
|
35
|
-
enableLatestDecorators,
|
|
36
|
-
ssg,
|
|
37
|
-
// set `true`, only in legacy config
|
|
38
|
-
enableAssetFallback: true,
|
|
39
|
-
enableAssetManifest: true,
|
|
40
|
-
disableNodePolyfill
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
createOutputConfig
|
|
45
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
function createSourceConfig(config) {
|
|
2
|
-
var _config_source = config.source, alias = _config_source.alias, envVars = _config_source.envVars, globalVars = _config_source.globalVars, include = _config_source.include, moduleScopes = _config_source.moduleScopes, preEntry = _config_source.preEntry, entries = _config_source.entries, mainEntryName = _config_source.mainEntryName, enableAsyncEntry = _config_source.enableAsyncEntry, enableCustomEntry = _config_source.enableCustomEntry, disableDefaultEntries = _config_source.disableDefaultEntries, entriesDir = _config_source.entriesDir, configDir = _config_source.configDir;
|
|
3
|
-
var builderGlobalVars = globalVars || {};
|
|
4
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
5
|
-
try {
|
|
6
|
-
for (var _iterator = (envVars || [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
7
|
-
var envVar = _step.value;
|
|
8
|
-
var envVarValue = process.env[envVar];
|
|
9
|
-
envVarValue && (builderGlobalVars["process.env.".concat(envVar)] = envVarValue);
|
|
10
|
-
}
|
|
11
|
-
} catch (err) {
|
|
12
|
-
_didIteratorError = true;
|
|
13
|
-
_iteratorError = err;
|
|
14
|
-
} finally {
|
|
15
|
-
try {
|
|
16
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
17
|
-
_iterator.return();
|
|
18
|
-
}
|
|
19
|
-
} finally {
|
|
20
|
-
if (_didIteratorError) {
|
|
21
|
-
throw _iteratorError;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
alias,
|
|
27
|
-
moduleScopes,
|
|
28
|
-
globalVars: builderGlobalVars,
|
|
29
|
-
include,
|
|
30
|
-
preEntry,
|
|
31
|
-
entries,
|
|
32
|
-
mainEntryName,
|
|
33
|
-
enableAsyncEntry,
|
|
34
|
-
enableCustomEntry,
|
|
35
|
-
disableDefaultEntries,
|
|
36
|
-
entriesDir,
|
|
37
|
-
configDir,
|
|
38
|
-
resolveExtensionPrefix: {
|
|
39
|
-
web: ".web",
|
|
40
|
-
node: ".node"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
createSourceConfig
|
|
46
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
function createToolsConfig(config) {
|
|
2
|
-
var _config_tools = config.tools, autoprefixer = _config_tools.autoprefixer, babel = _config_tools.babel, minifyCss = _config_tools.minifyCss, terser = _config_tools.terser, webpack = _config_tools.webpack, webpackChain = _config_tools.webpackChain, tsLoader = _config_tools.tsLoader, styledComponents = _config_tools.styledComponents, sass = _config_tools.sass, postcss = _config_tools.postcss, less = _config_tools.less, htmlPlugin = _config_tools.htmlPlugin, devServer = _config_tools.devServer, tailwindcss = _config_tools.tailwindcss, jest = _config_tools.jest, esbuild = _config_tools.esbuild;
|
|
3
|
-
var enableTsLoader = config.output.enableTsLoader;
|
|
4
|
-
return {
|
|
5
|
-
tsLoader: enableTsLoader ? tsLoader : void 0,
|
|
6
|
-
autoprefixer,
|
|
7
|
-
babel,
|
|
8
|
-
minifyCss,
|
|
9
|
-
terser,
|
|
10
|
-
webpack,
|
|
11
|
-
webpackChain,
|
|
12
|
-
styledComponents,
|
|
13
|
-
sass,
|
|
14
|
-
postcss,
|
|
15
|
-
less,
|
|
16
|
-
htmlPlugin,
|
|
17
|
-
devServer,
|
|
18
|
-
tailwindcss,
|
|
19
|
-
jest,
|
|
20
|
-
esbuild: {
|
|
21
|
-
loader: false,
|
|
22
|
-
minimize: esbuild
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
createToolsConfig
|
|
28
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createHtmlConfig } from "./createHtmlConfig";
|
|
2
|
-
import { createOutputConfig } from "./createOutputConfig";
|
|
3
|
-
import { createSourceConfig } from "./createSourceConfig";
|
|
4
|
-
import { createToolsConfig } from "./createToolsConfig";
|
|
5
|
-
function transformNormalizedConfig(config) {
|
|
6
|
-
var html = createHtmlConfig(config);
|
|
7
|
-
var output = createOutputConfig(config);
|
|
8
|
-
var source = createSourceConfig(config);
|
|
9
|
-
var tools = createToolsConfig(config);
|
|
10
|
-
var bff = config.bff, dev = config.dev, deploy = config.deploy, runtime = config.runtime, runtimeByEntries = config.runtimeByEntries, server = config.server, cliOptions = config.cliOptions, plugins = config.plugins, testing = config.testing, autoLoadPlugins = config.autoLoadPlugins;
|
|
11
|
-
return {
|
|
12
|
-
resolve: {},
|
|
13
|
-
source,
|
|
14
|
-
html,
|
|
15
|
-
output,
|
|
16
|
-
tools,
|
|
17
|
-
bff,
|
|
18
|
-
dev,
|
|
19
|
-
deploy,
|
|
20
|
-
runtime,
|
|
21
|
-
runtimeByEntries,
|
|
22
|
-
server,
|
|
23
|
-
cliOptions,
|
|
24
|
-
testing,
|
|
25
|
-
builderPlugins: [],
|
|
26
|
-
plugins,
|
|
27
|
-
security: {},
|
|
28
|
-
_raw: {},
|
|
29
|
-
experiments: {},
|
|
30
|
-
environments: {},
|
|
31
|
-
autoLoadPlugins,
|
|
32
|
-
performance: {
|
|
33
|
-
removeMomentLocale: true
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function checkIsLegacyConfig(config) {
|
|
38
|
-
return Boolean(config.legacy);
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
checkIsLegacyConfig,
|
|
42
|
-
transformNormalizedConfig
|
|
43
|
-
};
|
package/dist/esm/constants.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var PACKAGE_JSON_CONFIG_NAME = "modernConfig";
|
|
2
|
-
var STATE_PLUGIN_NAME = "@modern-js/plugin-state";
|
|
3
|
-
var DEFAULT_CONFIG_FILE = "modern.config";
|
|
4
|
-
var DEFAULT_SERVER_CONFIG_FILE = "modern.server-runtime.config";
|
|
5
|
-
var DEFAULT_RUNTIME_CONFIG_FILE = "modern.runtime";
|
|
6
|
-
export {
|
|
7
|
-
DEFAULT_CONFIG_FILE,
|
|
8
|
-
DEFAULT_RUNTIME_CONFIG_FILE,
|
|
9
|
-
DEFAULT_SERVER_CONFIG_FILE,
|
|
10
|
-
PACKAGE_JSON_CONFIG_NAME,
|
|
11
|
-
STATE_PLUGIN_NAME
|
|
12
|
-
};
|
package/dist/esm/defineConfig.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
|
-
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
|
-
var defineConfig = function(config) {
|
|
4
|
-
return config;
|
|
5
|
-
};
|
|
6
|
-
var defineLegacyConfig = function(config) {
|
|
7
|
-
var _config_autoLoadPlugins;
|
|
8
|
-
return _object_spread_props(_object_spread({}, config), {
|
|
9
|
-
legacy: true,
|
|
10
|
-
autoLoadPlugins: (_config_autoLoadPlugins = config.autoLoadPlugins) !== null && _config_autoLoadPlugins !== void 0 ? _config_autoLoadPlugins : true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
defineConfig,
|
|
15
|
-
defineLegacyConfig
|
|
16
|
-
};
|