@moneko/core 4.1.1 → 4.1.2

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.
Files changed (2) hide show
  1. package/lib/common.mjs +1 -1
  2. package/package.json +1 -1
package/lib/common.mjs CHANGED
@@ -1 +1 @@
1
- import{extname as e,join as t,resolve as s}from"node:path";import o,{config_files as a,CUSTOMCONFIG as n,TMP_DIR as i}from"./commom/paths.mjs";import r from"./commom/rule.mjs";import{OverrideResolverPlugin as l}from"./plugin/override-resolve.mjs";import{isObject as m,resolveProgram as c}from"./utils/index.mjs";import{CONFIG as p}from"./config.mjs";import u from"./plugins.config.mjs";import{app_schema as h,CACHE_NAME as d,isCI as f,isDev as g,isLibrary as y,packageJson as b,projectNameCamelCase as j}from"./process-env.mjs";export const outputConfig={path:c(y?"docs":"dist"),filename:e=>e.filename?.includes(".worker")?"worker/[name].js":"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",cssFilename:"style/[contenthash].css",cssChunkFilename:"style/[contenthash].chunk.css",assetModuleFilename:t=>{let s=e(t.filename||"").substring(1);return`assets/${s}/[hash][ext]`},library:{name:`${j}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${b.name}`,pathinfo:g,clean:!0,publicPath:p.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${j}`};let v={main:[`${h}:entry`]},C=[t(o.corePath,"./polyfills/public-path.mjs")];if(g&&p.refresh&&p.env.injectRemoteReactRefresh&&C.push(t(o.corePath,"./polyfills/inject-react-refresh.mjs")),p.polyfill&&C.push(t(o.corePath,"./polyfills/replace-children.mjs")),p.entry&&("string"==typeof p.entry?v={...v,main:[p.entry]}:Object.keys(p.entry)&&(v=Object.assign(v,p.entry))),"string"==typeof v.main?v.main=[...C,v.main]:Array.isArray(v.main)&&(v.main=[...C,...v.main]),p.output){if("string"==typeof p.output)outputConfig.path=p.output;else if(Object.keys(p.output)){let e=p.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof p.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let P={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,name:d,version:`${b.version}`,buildDependencies:{config:a},maxMemoryGenerations:1};!1===p.cache?P=!1:m(p.cache)&&(P=Object.assign(P,p.cache)),f&&(void 0===p.cache||p.cache&&!p.cache.cacheDirectory)&&(P.cacheDirectory=s(i,b.name));let k={},x={imports:!0,entries:!0,test:e=>{let s=e.nameForCondition();return!!(s&&(/^[a-z][a-z0-9]*:.+$/.test(s)||s?.startsWith(t(o.programPath,"src"))||s?.startsWith(t(o.programPath,"site"))||s?.startsWith(o.componentsPath)))}};p.lazyCompilation&&g&&"true"!==process.env.IS_BUILD?m(p.lazyCompilation)?Object.assign(k,x,p.lazyCompilation):Object.assign(k,x):k=!1;export const commonConfig={name:"client",target:"web",devtool:p.devtool,entry:v,mode:p.mode??"production",cache:P,snapshot:{immutablePaths:[o.pnpmNodeModules,o.denoNodeModules,r.node_modules],managedPaths:[o.pnpmNodeModules,o.denoNodeModules,r.node_modules],resolveBuildDependencies:{timestamp:!0,hash:!0},resolve:{timestamp:!0,hash:!0},module:{timestamp:!0,hash:!0},buildDependencies:{timestamp:!0,hash:!0},contextModule:{timestamp:!0,hash:!0}},stats:"errors-only",infrastructureLogging:{level:"error"},externalsPresets:p.externalsPresets,plugins:u,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!0,lazyCompilation:k,buildHttp:m(p.buildHttp)?{allowedUris:[],lockfileLocation:s(o.httpCachePath,"http.lock"),cacheLocation:s(o.httpCachePath,"data"),upgrade:!0,...p.buildHttp}:p.buildHttp,backCompat:!0,futureDefaults:!0,css:!0,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:p.alias,modules:[o.nodeModules,o.pnpmNodeModules,o.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:p.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:p.externals,output:outputConfig,recordsPath:p.recordsPath};p.overrideResolve&&commonConfig.resolve.plugins.push(new l(Object.assign({original:p.alias["@"],override:n&&c(n)},p.overrideResolve)));
1
+ import{extname as e,join as t,resolve as s}from"node:path";import{createDir as o}from"@moneko/utils";import a,{config_files as n,CUSTOMCONFIG as i,TMP_DIR as r}from"./commom/paths.mjs";import l from"./commom/rule.mjs";import{OverrideResolverPlugin as m}from"./plugin/override-resolve.mjs";import{isObject as c,resolveProgram as p}from"./utils/index.mjs";import{CONFIG as u}from"./config.mjs";import h from"./plugins.config.mjs";import{app_schema as d,CACHE_NAME as f,isCI as g,isDev as y,isLibrary as b,packageJson as j,projectNameCamelCase as v}from"./process-env.mjs";export const outputConfig={path:p(b?"docs":"dist"),filename:e=>e.filename?.includes(".worker")?"worker/[name].js":"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",cssFilename:"style/[contenthash].css",cssChunkFilename:"style/[contenthash].chunk.css",assetModuleFilename:t=>{let s=e(t.filename||"").substring(1);return`assets/${s}/[hash][ext]`},library:{name:`${v}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${j.name}`,pathinfo:y,clean:!0,publicPath:u.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${v}`};let C={main:[`${d}:entry`]},P=[t(a.corePath,"./polyfills/public-path.mjs")];if(y&&u.refresh&&u.env.injectRemoteReactRefresh&&P.push(t(a.corePath,"./polyfills/inject-react-refresh.mjs")),u.polyfill&&P.push(t(a.corePath,"./polyfills/replace-children.mjs")),u.entry&&("string"==typeof u.entry?C={...C,main:[u.entry]}:Object.keys(u.entry)&&(C=Object.assign(C,u.entry))),"string"==typeof C.main?C.main=[...P,C.main]:Array.isArray(C.main)&&(C.main=[...P,...C.main]),u.output){if("string"==typeof u.output)outputConfig.path=u.output;else if(Object.keys(u.output)){let e=u.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof u.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let k={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!0,name:f,version:`${j.version}`,buildDependencies:{config:n},maxMemoryGenerations:1};if(!1===u.cache?k=!1:c(u.cache)&&(k=Object.assign(k,u.cache)),g&&(void 0===u.cache||u.cache&&!u.cache.cacheDirectory)){let e=s(r,j.name);o(e)&&(k.cacheDirectory=e)}let x={},M={imports:!0,entries:!0,test:e=>{let s=e.nameForCondition();return!!(s&&(/^[a-z][a-z0-9]*:.+$/.test(s)||s?.startsWith(t(a.programPath,"src"))||s?.startsWith(t(a.programPath,"site"))||s?.startsWith(a.componentsPath)))}};u.lazyCompilation&&y&&"true"!==process.env.IS_BUILD?c(u.lazyCompilation)?Object.assign(x,M,u.lazyCompilation):Object.assign(x,M):x=!1;export const commonConfig={name:"client",target:"web",devtool:u.devtool,entry:C,mode:u.mode??"production",cache:k,snapshot:{immutablePaths:[a.pnpmNodeModules,a.denoNodeModules,l.node_modules],managedPaths:[a.pnpmNodeModules,a.denoNodeModules,l.node_modules],resolveBuildDependencies:{timestamp:!0,hash:!0},resolve:{timestamp:!0,hash:!0},module:{timestamp:!0,hash:!0},buildDependencies:{timestamp:!0,hash:!0},contextModule:{timestamp:!0,hash:!0}},stats:"errors-only",infrastructureLogging:{level:"error"},externalsPresets:u.externalsPresets,plugins:h,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!0,lazyCompilation:x,buildHttp:c(u.buildHttp)?{allowedUris:[],lockfileLocation:s(a.httpCachePath,"http.lock"),cacheLocation:s(a.httpCachePath,"data"),upgrade:!0,...u.buildHttp}:u.buildHttp,backCompat:!0,futureDefaults:!0,css:!0,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:u.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:u.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:u.externals,output:outputConfig,recordsPath:u.recordsPath};u.overrideResolve&&commonConfig.resolve.plugins.push(new m(Object.assign({original:u.alias["@"],override:i&&p(i)},u.overrideResolve)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",