@flatjs/evolve 1.8.1-next.40 → 1.8.1-next.42
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +37 -0
- package/dist/create-webpack/create-output.d.ts +1 -1
- package/dist/create-webpack/create-output.js +1 -1
- package/dist/create-webpack/load-webpack-config.js +1 -1
- package/dist/default-options.js +1 -1
- package/dist/dev-server/add-compiler-to-dev-server.js +1 -1
- package/dist/helpers/filter-actived-entries.d.ts +16 -0
- package/dist/helpers/filter-actived-entries.js +1 -0
- package/dist/helpers/get-git-root.d.ts +1 -0
- package/dist/helpers/get-git-root.js +1 -0
- package/dist/helpers/resolve-entry-map-input-files.d.ts +8 -0
- package/dist/helpers/resolve-entry-map-input-files.js +1 -0
- package/dist/main/index.d.ts +1 -0
- package/dist/main/index.js +1 -1
- package/dist/main/start-build-dynamic.d.ts +24 -0
- package/dist/main/start-build-dynamic.js +1 -0
- package/dist/main/start-build.d.ts +4 -5
- package/dist/main/start-build.js +1 -1
- package/dist/main/start-serve.d.ts +4 -4
- package/dist/main/start-serve.js +1 -1
- package/dist/main/start-static.d.ts +2 -2
- package/dist/types/types-dev-server.d.ts +9 -0
- package/dist/types/types-webpack.d.ts +7 -1
- package/package.json +23 -22
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,42 @@
|
|
1
1
|
# @flatjs/evolve
|
2
2
|
|
3
|
+
## 1.8.1-next.42
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 98a20bd: Add dynamic built module checker
|
8
|
+
- eeadd45: bump version
|
9
|
+
- 97a8e19: fix diff files with absolute path
|
10
|
+
- f3b97b8: Update package engine to `node:>=18` for Prefix-Only Core Modules
|
11
|
+
- 37efa04: refactor to support `module` pattern detect
|
12
|
+
- 6a81f82: Add new clientOverly options for `dev-server`
|
13
|
+
- Updated dependencies [eeadd45]
|
14
|
+
- Updated dependencies [f3b97b8]
|
15
|
+
- Updated dependencies [294590d]
|
16
|
+
- Updated dependencies [0d22375]
|
17
|
+
- Updated dependencies [8d45489]
|
18
|
+
- Updated dependencies [d286586]
|
19
|
+
- @flatjs/forge-postcss-plugin-pixel@1.8.1-next.19
|
20
|
+
- @flatjs/evolve-preset-babel@1.8.1-next.9
|
21
|
+
- @flatjs/common@1.8.1-next.19
|
22
|
+
- @flatjs/graph@1.8.1-next.20
|
23
|
+
- @flatjs/mock@1.8.1-next.36
|
24
|
+
|
25
|
+
## 1.8.1-next.41
|
26
|
+
|
27
|
+
### Patch Changes
|
28
|
+
|
29
|
+
- 0179446: bump version
|
30
|
+
- a11818e: bump version
|
31
|
+
- Updated dependencies [a3b66b5]
|
32
|
+
- Updated dependencies [5a427b6]
|
33
|
+
- Updated dependencies [0179446]
|
34
|
+
- Updated dependencies [a11818e]
|
35
|
+
- @flatjs/common@1.8.1-next.18
|
36
|
+
- @flatjs/forge-postcss-plugin-pixel@1.8.1-next.18
|
37
|
+
- @flatjs/evolve-preset-babel@1.8.1-next.8
|
38
|
+
- @flatjs/mock@1.8.1-next.35
|
39
|
+
|
3
40
|
## 1.8.1-next.40
|
4
41
|
|
5
42
|
### Patch Changes
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { type Configuration } from 'webpack';
|
2
2
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
3
|
-
export declare const createOutput: (serveMode: boolean, evolveOptions: FlatEvolveOptions) => Configuration['output']
|
3
|
+
export declare const createOutput: (serveMode: boolean, evolveOptions: FlatEvolveOptions) => Promise<Configuration['output']>;
|
@@ -1 +1 @@
|
|
1
|
-
import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";export const createOutput=(e,t)=>{const{projectCwd:a,webpack:n}=t;let o="auto";n?.publicPath&&"auto"!==n.publicPath&&(o=ensureSlash(n.publicPath,!0));return{devtoolModuleFilenameTemplate:({namespace:e,resourcePath:t})=>`webpack:///${join(e,t)}`,environment:{},pathinfo:!1,path:join(a,
|
1
|
+
import{join}from"node:path";import{ensureSlash}from"@flatjs/common";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";export const createOutput=async(e,t)=>{const{projectCwd:a,webpack:n}=t;let o="auto";n?.publicPath&&"auto"!==n.publicPath&&(o=ensureSlash(n.publicPath,!0));const u="function"==typeof n?.outputDir?await n.outputDir():n?.outputDir||"public";return{devtoolModuleFilenameTemplate:({namespace:e,resourcePath:t})=>`webpack:///${join(e,t)}`,environment:{},pathinfo:!1,path:join(a,u),publicPath:o,filename:`[name]/${getBundleFileName("js",e,n?.enableBundleHashName)}`,chunkFilename:"[id].[contenthash].js"}};
|
@@ -1 +1 @@
|
|
1
|
-
import{assertOnlySingleEntryItem}from"../helpers/assert-only-single-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";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:n}=r,c=n?.watchOptions,i=assertOnlySingleEntryItem(t,r),m=createRuleSets(a,i,r);return{mode:e,plugins:await createPlugins(a,i,r),watchOptions:c,context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:m},devtool:a?"eval-source-map":s?.sourceMap||!1,externals:createExternals(s?.externals,i),
|
1
|
+
import{assertOnlySingleEntryItem}from"../helpers/assert-only-single-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";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:n}=r,c=n?.watchOptions,i=assertOnlySingleEntryItem(t,r),m=createRuleSets(a,i,r);return{mode:e,plugins:await createPlugins(a,i,r),watchOptions:c,output:await createOutput(a,r),context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:m},devtool:a?"eval-source-map":s?.sourceMap||!1,externals:createExternals(s?.externals,i),performance:createPerformance(a,s?.performance),optimization:createOptimization(a,s),infrastructureLogging:s?.infrastructureLogging??{level:"warn"},stats:s?.stats??{preset:"minimal"},cache:{type:"memory"}}};
|
package/dist/default-options.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},cssnanoOptions:{},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"50%"};
|
1
|
+
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},cssnanoOptions:{},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"50%"};
|
@@ -1 +1 @@
|
|
1
|
-
import{join}from"node:path";import WebpackDevServer from"webpack-dev-server";export const addCompilerToDevServer=(e,r,o
|
1
|
+
import{join}from"node:path";import WebpackDevServer from"webpack-dev-server";export const addCompilerToDevServer=(e,r,t,o)=>{const{projectCwd:p,devServer:s}=o,l=new WebpackDevServer({server:{type:s?.https?"https":"http",options:{...s?.https}},open:!1,compress:!0,port:t,hot:r,liveReload:!r,allowedHosts:"all",static:{directory:`${join(p,"/public")}`},headers:{"Access-Control-Allow-Origin":"*"},client:{progress:!0,overlay:s?.clientOverlay}},e);return new Promise(((e,r)=>{l.startCallback((t=>{if(t)return r(t);e(!0)}))}))};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
2
|
+
/**
|
3
|
+
* Filter to find actived entry input by entry name filter.
|
4
|
+
* @param definedEntries
|
5
|
+
* @param modules `home;mine;`
|
6
|
+
* @returns activedEntries
|
7
|
+
*/
|
8
|
+
export declare const filterActivedEntriesByModule: (definedEntries: EvolveEntryMap, modules: string[]) => EvolveEntryMap;
|
9
|
+
/**
|
10
|
+
* Filter to find actived entry input by absolute entry filepath
|
11
|
+
* @param projectCwd
|
12
|
+
* @param definedEntries
|
13
|
+
* @param entryInputs [`/xxxx/x/xxxx/src/home/index.tsx`]
|
14
|
+
* @returns activedEntries
|
15
|
+
*/
|
16
|
+
export declare const filterActivedEntriesByEntryInputs: (projectCwd: string, definedEntries: EvolveEntryMap, entryInputs: string[]) => Promise<EvolveEntryMap>;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{arraysIntersect,normalizeSemicolonFilterParts}from"@flatjs/common";import{resolveEntryMapInputFiles}from"./resolve-entry-map-input-files.js";export const filterActivedEntriesByModule=(t,e)=>{const r=normalizeSemicolonFilterParts(e),n={};for(const[e,o]of Object.entries(t))r.find((t=>new RegExp(`${t}`).test(e)))&&(n[e]=o);return n};export const filterActivedEntriesByEntryInputs=async(t,e,r)=>{const n={};for(const[o,s]of Object.entries(e)){const e=await resolveEntryMapInputFiles(t,{[o]:s});arraysIntersect(e,r)&&(n[o]=s)}return n};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getGitRoot: (searchFrom: string) => string | null;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{searchParentDir}from"@armit/package";export const getGitRoot=r=>searchParentDir(r,".git");
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
2
|
+
/**
|
3
|
+
* Transform all entry files via `entryMap`
|
4
|
+
* @param projectCwd The project root directory
|
5
|
+
* @param entryMap The evolve entryMap definition
|
6
|
+
* @returns The absolute entry input files.
|
7
|
+
*/
|
8
|
+
export declare const resolveEntryMapInputFiles: (projectCwd: string, entryMap: EvolveEntryMap) => Promise<string[]>;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{fileWalk}from"@armit/file-utility";import{arrayUnique}from"@flatjs/common";export const resolveEntryMapInputFiles=async(t,r)=>{const e=[];for(const[,t]of Object.entries(r)){const r=t.entry.map((t=>t.replace(/.(?:js|jsx|tsx|ts)$/,"")+".*"));e.push(...r)}const o=arrayUnique(e);return await fileWalk(o,{cwd:t,absolute:!0})};
|
package/dist/main/index.d.ts
CHANGED
package/dist/main/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export*from"./start-build.js";export*from"./start-serve.js";export*from"./start-static.js";
|
1
|
+
export*from"./start-build.js";export*from"./start-serve.js";export*from"./start-static.js";export*from"./start-build-dynamic.js";
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { type PartialDeep } from 'type-fest';
|
2
|
+
import { type ConfigLoaderOptions } from '../load-config/load-evolve-config.js';
|
3
|
+
import { type FlatEvolveOptions } from '../types/types-options.js';
|
4
|
+
export declare function getBuildEntryFiles(projectCwd: string, diffFiles: string[], allEntryInputs: string[]): Promise<string[]>;
|
5
|
+
/**
|
6
|
+
* Dynamic check which entry modules need to build.
|
7
|
+
* @param projectCwd
|
8
|
+
* @param basedCommitHash
|
9
|
+
* @param newCommitHash
|
10
|
+
* @param overrideEvolveOptions
|
11
|
+
* @param configLoaderOptions
|
12
|
+
* @returns
|
13
|
+
*/
|
14
|
+
export declare function dynamicCheckBuildEntryMap(projectCwd: string, basedCommitHash: string, newCommitHash?: string, overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions): Promise<{
|
15
|
+
buildEntries: import("../index.js").EvolveEntryMap;
|
16
|
+
newEvolveOptions: FlatEvolveOptions;
|
17
|
+
}>;
|
18
|
+
/**
|
19
|
+
* The main entry to start an evolve `build` with automatically detect modules which have been changed between two commits.
|
20
|
+
* @param projectCwd The Root directory (workspace) of this project.
|
21
|
+
* @param basedCommitHash The diff based commit hash
|
22
|
+
* @param newCommitHash If is omitted, it will have the same effect as using HEAD instead.
|
23
|
+
*/
|
24
|
+
export declare const startDynamicBuild: (projectCwd: string, basedCommitHash: string, newCommitHash?: string, overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<import("./prepare-build.js").EvolveBuildResult[]>;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{isAbsolute,join}from"node:path";import{getDiffFiles}from"@armit/git";import{arraysIntersect,logger}from"@flatjs/common";import{traverseGraph}from"@flatjs/graph";import{filterActivedEntriesByEntryInputs}from"../helpers/filter-actived-entries.js";import{getGitRoot}from"../helpers/get-git-root.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{resolveEntryMapInputFiles}from"../helpers/resolve-entry-map-input-files.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareBuild}from"./prepare-build.js";export async function getBuildEntryFiles(t,r,e){const o=[],i=[];for(const t of e)r.includes(t)?o.push(t):i.push(t);if(i.length){const e=await traverseGraph({input:i,projectCwd:t,treeNodeFilter:()=>!0});if(!e)return o;for(const t of i){const i=e[t]||[];arraysIntersect(i,r)&&o.push(t)}}return o}export async function dynamicCheckBuildEntryMap(t,r,e,o,i){const n=await loadEvolveConfig({command:"build"},t,o,i),s=await resolveEntryMapInputFiles(t,n.entryMap);let a=await getDiffFiles(r,e);const l=getGitRoot(t);if(!l)throw new Error(`No .git root (${t}) found`);a=a.map((t=>isAbsolute(t)?t:join(l,t)));const p=await getBuildEntryFiles(t,a,s);return{buildEntries:await filterActivedEntriesByEntryInputs(t,n.entryMap,p),newEvolveOptions:n}}export const startDynamicBuild=async(t,r,e,o={},i)=>{const{buildEntries:n,newEvolveOptions:s}=await dynamicCheckBuildEntryMap(t,r,e,o,i),a=Object.keys(n);if(!a.length)return logger.warn("No build entries providered!"),[];logger.info({buildEntries:a});const l=normalizeEvolveEntryMap(n,s.entryMap);return prepareBuild(t,l,s)};
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { type PartialDeep } from 'type-fest';
|
2
2
|
import { type ConfigLoaderOptions } from '../load-config/load-evolve-config.js';
|
3
|
-
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
4
3
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
5
4
|
import { type EvolveBuildResult } from './prepare-build.js';
|
6
5
|
/**
|
7
6
|
* The main entry to start an evolve `build`
|
8
7
|
* @param projectCwd The Root directory (workspace) of this project.
|
9
|
-
* @param
|
10
|
-
* @param
|
11
|
-
* @param
|
8
|
+
* @param buildModules The filter pattern to detect modules we want to build.
|
9
|
+
* @param overrideEvolveOptions The overrided evolve options
|
10
|
+
* @param configLoaderOptions Evolve config loader options
|
12
11
|
*/
|
13
|
-
export declare const startBuild: (projectCwd: string,
|
12
|
+
export declare const startBuild: (projectCwd: string, buildModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<EvolveBuildResult[]>;
|
package/dist/main/start-build.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import{logger}from"@flatjs/common";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareBuild}from"./prepare-build.js";export const startBuild=async(e,r,o={},i)=>{const t=await loadEvolveConfig({command:"build"},e,o,i),l=filterActivedEntriesByModule(t.entryMap,r),n=Object.keys(l);if(!n.length)return logger.warn("No build entries providered!"),[];logger.info({buildEntries:n});const a=normalizeEvolveEntryMap(l,t.entryMap);return prepareBuild(e,a,t)};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { type PartialDeep } from 'type-fest';
|
2
2
|
import { type ConfigLoaderOptions } from '../load-config/load-evolve-config.js';
|
3
|
-
import { type EvolveEntryMap } from '../types/types-entry-map.js';
|
4
3
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
5
4
|
/**
|
6
5
|
* The main entry to start evolve serve
|
7
6
|
* @param projectCwd The Root directory (workspace) of this project.
|
8
|
-
* @param
|
9
|
-
* @param
|
7
|
+
* @param serveModules The filter pattern to detect modules we want to serve.
|
8
|
+
* @param overrideEvolveOptions The overrided evolve options
|
9
|
+
* @param configLoaderOptions Evolve config loader options
|
10
10
|
*/
|
11
|
-
export declare const startServe: (projectCwd: string,
|
11
|
+
export declare const startServe: (projectCwd: string, serveModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<never[] | import("express-serve-static-core").Express>;
|
package/dist/main/start-serve.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import{logger}from"@flatjs/common";import{filterActivedEntriesByModule}from"../helpers/filter-actived-entries.js";import{normalizeEvolveEntryMap}from"../helpers/normalize-entry-map.js";import{loadEvolveConfig}from"../load-config/load-evolve-config.js";import{prepareServe}from"./prepare-serve.js";export const startServe=async(e,r,o={},t)=>{const n=await loadEvolveConfig({command:"serve"},e,o,t),i=filterActivedEntriesByModule(n.entryMap,r),l=Object.keys(i);if(!l.length)return logger.warn("No served entries providered!"),[];logger.info({servedEntries:l});const a=normalizeEvolveEntryMap(i,n.entryMap);return prepareServe(e,a,n)};
|
@@ -4,7 +4,7 @@ import { type FlatEvolveOptions } from '../types/types-options.js';
|
|
4
4
|
/**
|
5
5
|
* The main entry to start evolve static server to proxy all modules of `production` build
|
6
6
|
* @param projectCwd The Root directory (workspace) of this project.
|
7
|
-
* @param
|
8
|
-
* @param configLoaderOptions
|
7
|
+
* @param overrideEvolveOptions The overrided evolve options
|
8
|
+
* @param configLoaderOptions Evolve config loader options
|
9
9
|
*/
|
10
10
|
export declare const startStatic: (projectCwd: string, overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<void>;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { type SecureContextHttps, type FlatMockOptions } from '@flatjs/mock';
|
2
2
|
import { type RequestHandler } from 'express';
|
3
3
|
import { type Configuration } from 'webpack';
|
4
|
+
import { type ClientConfiguration } from 'webpack-dev-server';
|
4
5
|
import { type EvolveEntryMapContent } from './types-entry-map.js';
|
5
6
|
export interface WebpackWatchOptions {
|
6
7
|
/**
|
@@ -40,6 +41,14 @@ export type FlatEvolveDevServerOptions = {
|
|
40
41
|
* @default true
|
41
42
|
*/
|
42
43
|
autoOpen?: boolean;
|
44
|
+
/**
|
45
|
+
* Enables a full-screen overlay in the browser when there are compiler errors or warnings.
|
46
|
+
* @default {
|
47
|
+
* errors: true,
|
48
|
+
* warnings: false,
|
49
|
+
* }
|
50
|
+
*/
|
51
|
+
clientOverlay?: ClientConfiguration['overlay'];
|
43
52
|
/**
|
44
53
|
* The customized config options of `flatjs/mock`, it will override options `flatjs-mock.config.mts`
|
45
54
|
*/
|
@@ -49,9 +49,10 @@ export interface FlatEvolveWebpackOptions extends Pick<Configuration, 'performan
|
|
49
49
|
* https://webpack.js.org/configuration/devtool/
|
50
50
|
* Only works on production mode , `source-map` Recommended choice for production builds with high quality SourceMaps.
|
51
51
|
* Note: the `sourceMap` only focus on javascript bundle,invalid for other `loaders` e.g. less-loader, css-loader.
|
52
|
+
* `hidden-source-map` produces the same sourcemaps as `source-map`, but doesn't include the `sourceMappingURL` comment at the bottom.
|
52
53
|
* @default `false`
|
53
54
|
*/
|
54
|
-
sourceMap?:
|
55
|
+
sourceMap?: 'hidden-source-map' | 'source-map' | false;
|
55
56
|
/**
|
56
57
|
* The rule sets loaders config options
|
57
58
|
*/
|
@@ -67,4 +68,9 @@ export interface FlatEvolveWebpackOptions extends Pick<Configuration, 'performan
|
|
67
68
|
* @default true
|
68
69
|
*/
|
69
70
|
enableBundleHashName?: boolean;
|
71
|
+
/**
|
72
|
+
* The output directory as absolute path
|
73
|
+
* @default `public`
|
74
|
+
*/
|
75
|
+
outputDir?: string | (() => string | Promise<string>);
|
70
76
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "1.8.1-next.
|
3
|
+
"version": "1.8.1-next.42",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -37,50 +37,51 @@
|
|
37
37
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@armit/file-utility": "^0.0.
|
41
|
-
"@armit/git": "^0.0.
|
42
|
-
"@armit/package": "^0.0.
|
43
|
-
"@babel/core": "7.
|
44
|
-
"@flatjs/common": "1.8.1-next.
|
45
|
-
"@flatjs/evolve-preset-babel": "1.8.1-next.
|
46
|
-
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.
|
47
|
-
"@flatjs/
|
40
|
+
"@armit/file-utility": "^0.0.21",
|
41
|
+
"@armit/git": "^0.0.23",
|
42
|
+
"@armit/package": "^0.0.33",
|
43
|
+
"@babel/core": "7.22.1",
|
44
|
+
"@flatjs/common": "1.8.1-next.19",
|
45
|
+
"@flatjs/evolve-preset-babel": "1.8.1-next.9",
|
46
|
+
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.19",
|
47
|
+
"@flatjs/graph": "1.8.1-next.20",
|
48
|
+
"@flatjs/mock": "1.8.1-next.36",
|
48
49
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
49
|
-
"@types/babel__core": "7.20.
|
50
|
+
"@types/babel__core": "7.20.1",
|
50
51
|
"babel-loader": "9.1.2",
|
51
52
|
"babel-merge": "3.0.0",
|
52
53
|
"babel-plugin-import": "1.13.6",
|
53
54
|
"better-opn": "3.0.2",
|
54
55
|
"case-sensitive-paths-webpack-plugin": "2.4.0",
|
55
|
-
"css-loader": "6.
|
56
|
+
"css-loader": "6.8.1",
|
56
57
|
"cssnano": "6.0.1",
|
57
58
|
"express": "4.18.2",
|
58
59
|
"fork-ts-checker-webpack-plugin": "8.0.0",
|
59
|
-
"happy-dom": "9.
|
60
|
+
"happy-dom": "9.20.3",
|
60
61
|
"html-webpack-plugin": "5.5.1",
|
61
62
|
"image-minimizer-webpack-plugin": "3.8.2",
|
62
63
|
"less": "4.1.3",
|
63
|
-
"less-loader": "11.1.
|
64
|
+
"less-loader": "11.1.1",
|
64
65
|
"lodash": "4.17.21",
|
65
66
|
"mini-css-extract-plugin": "2.7.6",
|
66
|
-
"postcss": "8.4.
|
67
|
-
"postcss-loader": "7.3.
|
67
|
+
"postcss": "8.4.24",
|
68
|
+
"postcss-loader": "7.3.2",
|
68
69
|
"react-refresh": "0.14.0",
|
69
70
|
"svgo": "3.0.2",
|
70
71
|
"terser-webpack-plugin": "5.3.9",
|
71
72
|
"tsconfig-paths-webpack-plugin": "4.0.1",
|
72
73
|
"type-fest": "^3.11.0",
|
73
|
-
"webpack": "5.
|
74
|
+
"webpack": "5.84.1",
|
74
75
|
"webpack-bundle-analyzer": "4.8.0",
|
75
76
|
"webpack-dev-server": "4.15.0",
|
76
77
|
"webpack-sources": "3.2.3"
|
77
78
|
},
|
78
79
|
"devDependencies": {
|
79
|
-
"@armit/eslint-config-bases": "^0.0.
|
80
|
-
"@flatjs/testing": "1.8.1-next.
|
81
|
-
"@swc/core": "1.3.
|
80
|
+
"@armit/eslint-config-bases": "^0.0.17",
|
81
|
+
"@flatjs/testing": "1.8.1-next.16",
|
82
|
+
"@swc/core": "1.3.61",
|
82
83
|
"@types/express": "4.17.17",
|
83
|
-
"@types/node": "20.2.
|
84
|
+
"@types/node": "20.2.5",
|
84
85
|
"@vitest/coverage-istanbul": "0.31.1",
|
85
86
|
"@vitest/ui": "0.31.1",
|
86
87
|
"eslint": "8.41.0",
|
@@ -96,7 +97,7 @@
|
|
96
97
|
"ts-node": "10.9.1",
|
97
98
|
"vite-tsconfig-paths": "4.2.0",
|
98
99
|
"vitest": "0.31.1",
|
99
|
-
"vue-loader": "17.1.
|
100
|
+
"vue-loader": "17.1.2"
|
100
101
|
},
|
101
102
|
"peerDependencies": {
|
102
103
|
"imagemin-gifsicle": ">=7.0.0",
|
@@ -119,7 +120,7 @@
|
|
119
120
|
}
|
120
121
|
},
|
121
122
|
"engines": {
|
122
|
-
"node": ">=
|
123
|
+
"node": ">=18.0.0"
|
123
124
|
},
|
124
125
|
"publishConfig": {
|
125
126
|
"access": "public",
|