@moneko/core 4.11.4 → 4.11.5
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/config.mjs +1 -1
- package/lib/module.config.mjs +1 -1
- package/package.json +2 -2
package/lib/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sep as e}from"node:path";import o from"node:process";import{merge as t}from"webpack-merge";import{CUSTOMCONFIG as n}from"./commom/custom-config.mjs";import s from"./commom/paths.mjs";import{join as i}from"./commom/posix.mjs";import
|
|
1
|
+
import{sep as e}from"node:path";import o from"node:process";import{merge as t}from"webpack-merge";import{CUSTOMCONFIG as n}from"./commom/custom-config.mjs";import s from"./commom/paths.mjs";import{join as i}from"./commom/posix.mjs";import r from"./commom/setup-env.mjs";import a from"./options/jsx-dom-expressions.mjs";import m from"./options/split-chunk.mjs";import{getConfigWithTypescript as l,isFunction as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{initDts as d}from"./vm/dts.mjs";import{APPTYPE as f,FRAMEWORK as h,frameworkVersion as g,isBuild as v,isCI as x,isDev as b,isLibrary as j,isMobile as C,isReact as P,jsxImportSource as k,mainDirectory as w,NODE_ENV as O,PACKAGENAME as y}from"./process-env.mjs";let S=[/(app|vm|docs|example):[a-zA-Z_0-9]/,"@moneko","neko-ui",".cache/http/data","@element-plus","ant-design-vue","element-plus","element-ui","ng-zorro-antd","@mui","@du","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design","monaco-editor","codemirror-json-schema"];export async function getConfig(e){let t=l(e).default;return(p(t)?await t(o):t)??{}}let I=await r(O,f,h,[],v,n),[z,F]=await Promise.all([getConfig(s.configPath),getConfig(s.customConfigPath)]),M={mode:O,strict:!1,devtool:!1,seo:!1,bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:(!!x||!b)&&{},sourceMap:{filename:"[file].map",publicPath:"",namespace:y,moduleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]",fallbackModuleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]"},env:I,basename:"/",publicPath:"auto",rem:{designSize:C?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":u(w)},P&&g<18?{"react/package.json":c("react/package.json"),"react/jsx-runtime":c("react/jsx-runtime.js"),"react/jsx-dev-runtime":c("react/jsx-dev-runtime.js")}:{}),moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3,open:!0},htmlPluginOption:{title:y.toLocaleUpperCase(),favicon:"https://h5static.dewucdn.com/node-common/718d5e10-576d-8b14-b0b1-e4c58c3b3f40.webp"},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:m,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:S,js:S,media:S,font:S,wasm:[]},mdx:{jsx:!1,development:b,jsxImportSource:k,providerImportSource:`@moneko/${h}/mdx`},jsxDomExpressions:a,bar:{name:"Client",nameColor:"68",msgColor:"242",barBgColor:"15",barColor:"69",quiet:x},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:"solid"!==h,bundleId:"com.moneko.bid",bundles:[],stylelint:{},eslint:{lintDirtyModulesOnly:!1},minChunkSize:1e3,compression:!1,manifest:{filename:"site.webmanifest"},corepack:!0,reactJsxRuntime:"automatic"};j&&(M.alias=Object.assign(M.alias,{"@pkg":s.componentsPath,[y]:s.componentsPath}));let A=M;if(A=t(A,z,F),"true"===o.env.CODESPACES&&A.devServer.https&&(A.devServer.https=!1),!1===A.devServer.https&&"darwin"===o.platform&&(A.devServer.open=!1),A.htmlPluginOption&&(A.htmlPluginOption.tags||(A.htmlPluginOption.tags=[]),A.fixBrowserRouter&&A.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}),A.manifest)){let o=A.manifest.publicPath??A.htmlPluginOption.publicPath??A.publicPath??"/";A.htmlPluginOption.tags.push({href:i("auto"===o?"/":o,A.manifest.filename).replaceAll(e,"/"),tag:"link",rel:"manifest"})}export const CONFIG=A;export const PUBLICPATH="auto"===CONFIG.publicPath?"":CONFIG.publicPath;d(CONFIG);
|
package/lib/module.config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e;import{join as s,sep as o}from"node:path";import t,{CUSTOMCONFIG as r}from"./commom/paths.mjs";import a from"./commom/require.mjs";import*as
|
|
1
|
+
let e;import{join as s,sep as o}from"node:path";import t,{CUSTOMCONFIG as r}from"./commom/paths.mjs";import a from"./commom/require.mjs";import*as l from"./commom/rule.mjs";import n from"./options/modify-vars.mjs";import i from"./options/reslove.mjs";import m from"./options/swcrc.mjs";import{getLightningCssTargets as c}from"./polyfills/targets.mjs";import{node_modules as p,resolveProgram as d}from"./utils/index.mjs";import u from"./utils/svg-to-data-uri.mjs";import{outputConfig as f}from"./common.mjs";import{CONFIG as y}from"./config.mjs";import{app_schema as h,FRAMEWORK as j,virtual_schema as g}from"./process-env.mjs";let x={loader:s(t.corePath,"/loader/lightning-css.cjs"),options:{sourceMap:!!y.sourceMap,targets:c(),rem:!!y.rem,importLoaders:2}},v={loader:i.lessLoader,options:{sourceMap:!!y.sourceMap,lessOptions:{modifyVars:n,javascriptEnabled:!0}}},w=new Map,L=["components","example","mock","site","src","server"].map(e=>d(e));function M(e){return new Promise(s=>{s([...L,t.corePath,...y.rulesInclude?.[e]?.map(e=>"string"==typeof e?function(e){if(w.has(e))return w.get(e);try{let s,t=a.resolve(e).split(o),r=t.lastIndexOf("node_modules");return s=-1!==r?t.slice(0,r).join(o):t.join(o),w.set(e,[s]),[s]}catch{try{let s=a.resolve(`${e}${o}package.json`).replace(`${o}package.json`,"");w.set(e,[s])}catch{w.set(e,[p(e),p(".pnpm",e)])}return w.get(e)}}(e):e).flat()||[]])})}r&&L.push(d(r)),y.overrideResolve&&y.overrideResolve.override&&L.push(y.overrideResolve.override);let P=await Promise.all([M("css"),M("js"),M("media"),M("wasm"),M("font")]),_=P[0],I=P[1],b=P[2],O=P[3],C=P[4];i.sassLoader&&(e={loader:i.sassLoader,options:{implementation:await import("sass"),sassOptions:{}}});let k=f.library?.type==="umd"&&!1===y.htmlPluginOption,B=[{resourceQuery:/raw/i,type:"asset/source"},{resourceQuery:/url/i,type:"asset/resource",generator:{filename(e){let s=e.filename;return s&&s.toLocaleLowerCase().endsWith("wasm?url")?"wasm/[hash][ext]":"assets/[hash][ext]"}}},{test:l.wasm,type:"webassembly/async",include:O},{test:l.txt,type:"asset/source"},{test:l.image,type:"asset",dependency:{not:["url"]},parser:{dataUrlCondition:k?()=>!0:{maxSize:4096}},generator:{filename:e=>e.filename?.toLocaleLowerCase().endsWith(".svg")?"assets/svg/[hash][ext]":"assets/images/[hash][ext]",dataUrl:(e,s)=>s.filename.toLocaleLowerCase().endsWith(".svg")?u(e.toString()):e},include:b},{test:l.video,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/video/[hash][ext]"},include:b},{test:l.font,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/fonts/[hash][ext]"},include:C}],N=y.prefixJsLoader.filter(Boolean)||[];y.cssInJs&&"object"==typeof y.cssInJs.minify&&N.unshift({loader:s(t.corePath,"/loader/css-in-js-minify.cjs"),options:Object.assign({moduleName:"@moneko/css",allowFuncs:["css","injectGlobal"]},y.cssInJs.minify)});export default(o=>{let r={react:{loader:i.swcLoader,options:m(o)},solid:{loader:s(t.corePath,"/loader/solid.cjs"),options:{jsxOptions:y.jsxDomExpressions,refresh:y.refresh}}}[j];return{generator:{"css/auto":{exportsOnly:!1,exportsConvention:"camel-case-only",localIdentName:"[uniqueName]_[id]_[local]",esModule:!0},"css/module":{exportsOnly:!1,exportsConvention:"camel-case-only",localIdentName:"[uniqueName]_[id]_[local]",esModule:!0}},parser:{javascript:{commonjsMagicComments:!0,dynamicImportMode:"lazy",dynamicImportPrefetch:!1,dynamicImportPreload:!1,importMeta:!0,importMetaContext:!0},css:{import:!0,namedExports:!0,url:!0},json:{exportsDepth:1}},noParse:y.noParse,rules:[{oneOf:[...B,{test:l.js,use:[...N,r].filter(Boolean),include:I,resolve:{fullySpecified:!1}},...y.cssModules.map(e=>({test:s=>l.node_modules_css_module.test(s)&&s.includes(e),use:[x],type:"css/module"})),{test:l.css,use:[x],type:"css/auto",include:_},e&&{test:l.sass_global,use:[x,e],type:"css/auto",include:_},e&&{test:l.scss,use:[x,e],type:"css/module",include:_},{test:l.less_global,use:[x,v],type:"css/auto",include:_},{test:l.less,use:[x,v],type:"css/module",include:_},{test:l.markdown,use:[...N,{loader:s(t.corePath,"/loader/mdx.cjs"),options:y.mdx}].filter(Boolean),exclude:[l.node_modules,e=>e.startsWith(`${h}:`)||e.startsWith(`${g}:`)]}].filter(Boolean)},...y.moduleRules].filter(Boolean)}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.5",
|
|
4
4
|
"description": "@moneko/core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"core-js": "3.50.0",
|
|
147
147
|
"core-js-compat": "3.50.0",
|
|
148
148
|
"husky": "9.1.7",
|
|
149
|
-
"less": "4.9.
|
|
149
|
+
"less": "4.9.1",
|
|
150
150
|
"less-loader": "12.3.3",
|
|
151
151
|
"lightningcss": "1.33.0",
|
|
152
152
|
"swc-loader": "0.2.7",
|