@flatjs/evolve 2.1.0-next.21 → 2.1.0-next.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -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"}}};
|