@moneko/core 3.24.2 → 3.24.4

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.
package/lib/common.mjs CHANGED
@@ -1 +1 @@
1
- import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as a}from"./paths.mjs";import s from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as r,isDev as l,isLibrary as m}from"./process-env.mjs";import{isObject as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{join as h,resolve as d,extname as f}from"path";import{exampleModuleName as g}from"./vm/example.mjs";import y from"./vm/info.mjs";export const outputConfig={path:u(m?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${l?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=f(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:`${y.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:l,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let b={main:[e.polyfill&&h(o.corePath,"./polyfills/replace-children.mjs"),c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?b={main:[e.entry]}:Object.keys(e.entry)&&(b=Object.assign(b,e.entry))),"string"==typeof b.main&&(b.main=[b.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let j=!1;p(e.cache)&&(j=Object.assign({type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,name:[a,process.env.NODE_ENV].filter(Boolean).join("-"),version:`${r}`},e.cache));let v=Object.assign({original:e.alias["@"],override:a&&u(a)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:b,mode:l?"development":"production",stats:"errors-only",cache:j,infrastructureLogging:{level:"error"},performance:e.performance,externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:e.lazyCompilation&&l&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(c(g))||t.startsWith(c("@app/comment"))||t.startsWith(o.pagesPath)||t.startsWith(o.componentsPath)))}},buildHttp:p(e.buildHttp)?{allowedUris:[],lockfileLocation:d(o.httpCachePath,"http.lock"),cacheLocation:d(o.httpCachePath,"data"),upgrade:!0,...e.buildHttp}:e.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:["...",".jsx",".ts",".tsx"],alias:e.alias,modules:[o.nodeModules,o.pnpmNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[e.overrideResolve&&new s(v),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},externals:e.externals,output:outputConfig};
1
+ import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as a}from"./paths.mjs";import s from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as r,isDev as l,isLibrary as m}from"./process-env.mjs";import{isObject as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{join as h,resolve as d,extname as f}from"path";import{exampleModuleName as g}from"./vm/example.mjs";import y from"./vm/info.mjs";export const outputConfig={path:u(m?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${l?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=f(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:`${y.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:l,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let b={main:[e.polyfill&&h(o.corePath,"./polyfills/replace-children.mjs"),c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?b={main:[e.entry]}:Object.keys(e.entry)&&(b=Object.assign(b,e.entry))),"string"==typeof b.main&&(b.main=[b.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let j={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,name:[a,process.env.NODE_ENV].filter(Boolean).join("-"),version:`${r}`};!1===e.cache?j=!1:p(e.cache)&&(j=Object.assign(j,e.cache));let v=Object.assign({original:e.alias["@"],override:a&&u(a)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:b,mode:l?"development":"production",stats:"errors-only",cache:j,infrastructureLogging:{level:"error"},performance:e.performance,externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:e.lazyCompilation&&l&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(c(g))||t.startsWith(c("@app/comment"))||t.startsWith(o.pagesPath)||t.startsWith(o.componentsPath)))}},buildHttp:p(e.buildHttp)?{allowedUris:[],lockfileLocation:d(o.httpCachePath,"http.lock"),cacheLocation:d(o.httpCachePath,"data"),upgrade:!0,...e.buildHttp}:e.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:["...",".jsx",".ts",".tsx"],alias:e.alias,modules:[o.nodeModules,o.pnpmNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[e.overrideResolve&&new s(v),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},externals:e.externals,output:outputConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.24.2",
3
+ "version": "3.24.4",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -57,9 +57,9 @@
57
57
  "@types/multer": "1.4.12",
58
58
  "@types/webpack-bundle-analyzer": "4.7.0",
59
59
  "@types/webpack-hot-middleware": "2.25.9",
60
- "babel-plugin-react-compiler": "19.0.0-beta-63b359f-20241101",
60
+ "babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
61
61
  "oxlint": "0.11.1",
62
- "sass": "1.80.6",
62
+ "sass": "1.80.7",
63
63
  "sass-loader": "16.0.3",
64
64
  "solid-refresh": "0.7.5"
65
65
  },
@@ -121,6 +121,9 @@ export interface Theme {
121
121
  errorColor?: string;
122
122
  warningColor?: string;
123
123
  }
124
+ interface CacheConfig extends FileCacheOptions, MemoryCacheOptions {
125
+ type?: 'filesystem' | 'memory';
126
+ }
124
127
  export declare type ConfigType = {
125
128
  /**
126
129
  * @default true
@@ -244,7 +247,7 @@ export declare type ConfigType = {
244
247
  /**
245
248
  * 缓存配置
246
249
  */
247
- cache?: FileCacheOptions | MemoryCacheOptions | false;
250
+ cache?: CacheConfig | false;
248
251
  /** 开发服务器设置 */
249
252
  devServer: {
250
253
  headers?: Record<string, string>;