@flatjs/evolve 2.1.0-next.21 → 2.1.0-next.23
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
import webpack from"webpack";import{getDirname}from"@armit/file-utility";import{createExternals}from"../create-webpack/create-externals.js";import{createResolve}from"../create-webpack/create-resolve.js";import{ruleBabel}from"../create-webpack/rule-sets/rule-scripts.js";import{createTsCheckerPlugins}from"../plugins/ts-checker/ts-checker-plugin.js";export const createGlobalCompiler=(e,r)=>{const{projectCwd:t,webpack:o,devServer:a}=r,c=e?"development":"production",
|
1
|
+
import webpack from"webpack";import{getDirname}from"@armit/file-utility";import{createExternals}from"../create-webpack/create-externals.js";import{createResolve}from"../create-webpack/create-resolve.js";import{ruleBabel}from"../create-webpack/rule-sets/rule-scripts.js";import{createTsCheckerPlugins}from"../plugins/ts-checker/ts-checker-plugin.js";export const createGlobalCompiler=async(e,r)=>{const{projectCwd:t,webpack:o,devServer:a,globalCompilerOptions:c}=r,{runTsChecker:l=!0}=c||{};if(!l)return!1;const s=e?"development":"production",n=a?.watchOptions||{},p=[ruleBabel({})],i=[...createTsCheckerPlugins(e,r)],m={context:t,mode:s,watch:e,name:"flat/evolve/global-compiler",entry:{".global-compiler-bundle":["."]},resolve:createResolve(t,o),module:{rules:p},plugins:i,watchOptions:n,devtool:!1,externals:createExternals(o?.externals),cache:{type:"memory"},performance:{},output:{environment:{},path:getDirname(import.meta.url,"./")}};return new Promise(((e,r)=>{webpack(m,(t=>{if(t)return r(t.message);e(!0)}))}))};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { type FlatEvolveDevServerOptions } from '../types/types-dev-server.js';
|
2
|
-
import {
|
2
|
+
import { EntryMapItem } from '../types/types-entry-map.js';
|
3
3
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
4
4
|
/**
|
5
5
|
* Loads the watch options for webpack configuration.
|
6
6
|
*
|
7
|
-
* @param
|
7
|
+
* @param entryMapItemList - The list of entry map items.
|
8
8
|
* @param evolveOptions - The options for the evolve process.
|
9
9
|
* @param originalOptions - The original watch options to be merged with.
|
10
10
|
* @returns The updated watch options for webpack configuration.
|
11
11
|
*/
|
12
|
-
export declare const loadWatchOptions: (
|
12
|
+
export declare const loadWatchOptions: (entryMapItemList: EntryMapItem[], evolveOptions: FlatEvolveOptions, originalOptions?: FlatEvolveDevServerOptions["watchOptions"]) => FlatEvolveDevServerOptions["watchOptions"];
|
@@ -1 +1 @@
|
|
1
|
-
export const loadWatchOptions=(o,
|
1
|
+
import{normalizeEvolveEntryName}from"../helpers/normalize-entry-map.js";export const loadWatchOptions=(e,o,r={})=>{const{ignored:n=[]}=r,{entryMap:t,projectVirtualPath:a}=o;for(const[o]of Object.entries(t)){const r=normalizeEvolveEntryName(o,a);e.findIndex((e=>e[0]===r))<0&&n.push(`**/${r}/**/*`)}return{...r,ignored:n}};
|
@@ -1 +1 @@
|
|
1
|
-
import{assertGroupEntryItem}from"../helpers/assert-group-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";import{loadWatchOptions}from"./load-watch-options.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:c}=r,p=
|
1
|
+
import{assertGroupEntryItem}from"../helpers/assert-group-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";import{loadWatchOptions}from"./load-watch-options.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:c}=r,p=assertGroupEntryItem(t,r),n=loadWatchOptions(p,r,c?.watchOptions),i=createRuleSets(a,p,r),m=await createPlugins(a,p,r),l=p[0];return{mode:e,plugins:m,watchOptions:n,output:await createOutput(a,r,l),context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:i},devtool:a?"eval-source-map":s?.sourceMap||!1,externalsType:s?.externalsType,externals:createExternals(s?.externals,l),performance:createPerformance(a,s?.performance),optimization:createOptimization(a,r,l),infrastructureLogging:s?.infrastructureLogging??{level:"warn"},stats:s?.stats??{preset:"minimal"},cache:{type:"memory"}}};
|
@@ -78,7 +78,7 @@ export interface EvolveEntryItemOption extends MultiHtmlCDNEntryItem {
|
|
78
78
|
* ```
|
79
79
|
* @default undefined
|
80
80
|
*/
|
81
|
-
output?: Configuration['output']
|
81
|
+
output?: Omit<Required<Configuration>['output'], 'chunkFilename' | 'cssChunkFilename'>;
|
82
82
|
}
|
83
83
|
export type EvolveEntryMapContent = {
|
84
84
|
entry: [string, ...string[]];
|