@moneko/core 3.18.0 → 3.18.1
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 +1 -1
- package/lib/utils/index.d.mts +1 -1
- package/lib/utils/index.mjs +1 -1
- package/lib/vm/info.mjs +1 -1
- package/package.json +1 -1
package/lib/common.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as
|
|
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};
|
package/lib/utils/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function toCamelCase(str: string): string;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function convertToCamelCase(name: string): string;
|
|
3
3
|
type ProgramPath<T extends string> = `${T extends string ? T : string}`;
|
|
4
4
|
/** 位于项目根目录下的位置
|
|
5
5
|
* @param {string} src 路径
|
package/lib/utils/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolve as
|
|
1
|
+
import{resolve as e}from"path";import t from"../paths.mjs";export function toCamelCase(e){return e.replace(/-./g,e=>e.charAt(1).toUpperCase())}export function convertToCamelCase(e){return e.toLowerCase().replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"").replace(/^./,e=>e.toUpperCase()).replace(/Ui$/,"UI")}export function resolveProgram(o){return e(t.programPath,`./${o}`)}export function node_modules(o){return e(t.nodeModules,`./${o}`)}export function isObject(e){let t=typeof e;return null!==e&&("object"===t||"function"===t)}export function isFunction(e){return["[object Function]","[object AsyncFunction]","[object GeneratorFunction]","[object Proxy]"].includes(Object.prototype.toString.call(e))}export function empty(){}
|
package/lib/vm/info.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIG as e}from"../config.mjs";import{description as r,author as o,repository as t,APPTYPE as s,PACKAGENAME as m,PACKAGEVERSION as i,SSR as p}from"../process-env.mjs";import{
|
|
1
|
+
import{CONFIG as e}from"../config.mjs";import{description as r,author as o,repository as t,APPTYPE as s,PACKAGENAME as m,PACKAGEVERSION as i,SSR as p}from"../process-env.mjs";import{convertToCamelCase as n}from"../utils/index.mjs";let a="string"==typeof o,f={name:m,projectName:n(m),ssr:p,version:i,base:e.basename,type:s,routerMode:e.routerMode,prefixCls:e.prefixCls,theme:e.theme,description:r,author:a?{name:o}:o,repository:a?{url:t}:t};export default f;
|