@moneko/core 3.56.19 → 3.56.20-beta.0
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/package.json +1 -1
package/lib/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as e,relative as o}from"node:path";import t from"node:process";import{fileExists as r}from"@moneko/utils";import{merge as n}from"webpack-merge";import
|
|
1
|
+
import{join as e,relative as o}from"node:path";import t from"node:process";import{fileExists as r}from"@moneko/utils";import{merge as n}from"webpack-merge";import s from"./commom/paths.mjs";import a from"./commom/require.mjs";import i from"./commom/setup-env.mjs";import l from"./options/jsx-dom-expressions.mjs";import m from"./options/split-chunk.mjs";import{isFunction as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{APPTYPE as d,FRAMEWORK as f,frameworkVersion as h,isCI as g,isDev as v,isLibrary as x,isMobile as j,isReact as C,jsxImportSource as P,mainDirectory as k,NODE_ENV as b,PACKAGENAME as w}from"./process-env.mjs";let I=["@app","@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"];export function getConfig(e){return delete a.cache[e],new Promise(o=>{if(r(e)){let r=a(e).default;return o(p(r)?r(t):r)}return o({})})}let O=await Promise.all([i(b,d,f,[],"true"===t.env.IS_BUILD),getConfig(s.configPath),getConfig(s.customConfigPath)]),S=O[0],y=O[1],M=O[2],D={mode:b,strict:!1,devtool:"true"!==t.env.IS_BUILD&&v?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:"",namespace:w,moduleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]",fallbackModuleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]"},env:S,basename:"/",publicPath:"auto",rem:{designSize:j?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":u(k)},C&&h<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:w.toLocaleUpperCase(),favicon:o(s.programPath,`${s.corePath}/options/favicon.ico`)},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:m,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:I,js:I,media:I,font:I,wasm:[]},mdx:{jsx:!1,development:v,jsxImportSource:P,providerImportSource:`@moneko/${f}/mdx`},jsxDomExpressions:l,bar:{name:"Client",nameColor:"68",msgColor:"242",barBgColor:"15",barColor:"69",quiet:g},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:"solid"!==f,bundleId:"com.moneko.bid",bundles:[],stylelint:{},eslint:{lintDirtyModulesOnly:!1},minChunkSize:1e3,compression:"true"!==t.env.IS_BUILD,manifest:{filename:"manifest.json"},corepack:!0,reactJsxRuntime:"automatic"};x&&(D.alias=Object.assign(D.alias,{"@pkg":s.componentsPath,[w]:s.componentsPath}));let B=D;(!1===(B=n(B,y,M)).devtool||!1===B.sourceMap)&&(B.sourceMap=!1,B.devtool=!1),"true"===t.env.CODESPACES&&(B.devServer.https=!1),!1===B.devServer.https&&"darwin"===t.platform&&(B.devServer.open=!1),B.htmlPluginOption&&(B.htmlPluginOption.tags||(B.htmlPluginOption.tags=[]),B.fixBrowserRouter&&B.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))"}),B.manifest&&B.htmlPluginOption.tags.push({href:e(B.basename,B.manifest.filename).replaceAll(/\\/g,"/"),tag:"link",rel:"manifest"}));export const CONFIG=B;export const PUBLICPATH="auto"===CONFIG.publicPath?"":CONFIG.publicPath;
|