mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[build] rewrite source as transpiled JS later in the process (#73749)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
86c13869a2
commit
6bfd4e6af3
3 changed files with 13 additions and 7 deletions
|
@ -110,7 +110,7 @@ const observeCompiler = (
|
|||
|
||||
const bundleRefExportIds: string[] = [];
|
||||
const referencedFiles = new Set<string>();
|
||||
let normalModuleCount = 0;
|
||||
let moduleCount = 0;
|
||||
let workUnits = stats.compilation.fileDependencies.size;
|
||||
|
||||
if (bundle.manifestPath) {
|
||||
|
@ -119,7 +119,7 @@ const observeCompiler = (
|
|||
|
||||
for (const module of stats.compilation.modules) {
|
||||
if (isNormalModule(module)) {
|
||||
normalModuleCount += 1;
|
||||
moduleCount += 1;
|
||||
const path = getModulePath(module);
|
||||
const parsedPath = parseFilePath(path);
|
||||
|
||||
|
@ -154,7 +154,12 @@ const observeCompiler = (
|
|||
continue;
|
||||
}
|
||||
|
||||
if (isExternalModule(module) || isIgnoredModule(module) || isConcatenatedModule(module)) {
|
||||
if (isConcatenatedModule(module)) {
|
||||
moduleCount += module.modules.length;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isExternalModule(module) || isIgnoredModule(module)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -180,13 +185,13 @@ const observeCompiler = (
|
|||
bundleRefExportIds,
|
||||
optimizerCacheKey: workerConfig.optimizerCacheKey,
|
||||
cacheKey: bundle.createCacheKey(files, mtimes),
|
||||
moduleCount: normalModuleCount,
|
||||
moduleCount,
|
||||
workUnits,
|
||||
files,
|
||||
});
|
||||
|
||||
return compilerMsgs.compilerSuccess({
|
||||
moduleCount: normalModuleCount,
|
||||
moduleCount,
|
||||
});
|
||||
})
|
||||
);
|
||||
|
|
|
@ -155,6 +155,7 @@ export interface WebpackConcatenatedModule {
|
|||
id: number;
|
||||
dependencies: Dependency[];
|
||||
usedExports: string[];
|
||||
modules: unknown[];
|
||||
}
|
||||
|
||||
export function isConcatenatedModule(module: any): module is WebpackConcatenatedModule {
|
||||
|
|
|
@ -63,17 +63,17 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
|
|||
await run(Tasks.CopyBinScripts);
|
||||
await run(Tasks.CreateEmptyDirsAndFiles);
|
||||
await run(Tasks.CreateReadme);
|
||||
await run(Tasks.TranspileBabel);
|
||||
await run(Tasks.BuildPackages);
|
||||
await run(Tasks.CreatePackageJson);
|
||||
await run(Tasks.InstallDependencies);
|
||||
await run(Tasks.BuildKibanaPlatformPlugins);
|
||||
await run(Tasks.TranspileBabel);
|
||||
await run(Tasks.RemoveWorkspaces);
|
||||
await run(Tasks.CleanPackages);
|
||||
await run(Tasks.CreateNoticeFile);
|
||||
await run(Tasks.UpdateLicenseFile);
|
||||
await run(Tasks.RemovePackageJsonDeps);
|
||||
await run(Tasks.TranspileScss);
|
||||
await run(Tasks.BuildKibanaPlatformPlugins);
|
||||
await run(Tasks.OptimizeBuild);
|
||||
await run(Tasks.CleanTypescript);
|
||||
await run(Tasks.CleanExtraFilesFromModules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue