@moneko/core 4.6.2 → 4.6.3
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{relative as e}from"node:path";import
|
|
1
|
+
import{relative as e,sep as o}from"node:path";import t from"node:process";import{merge as a}from"webpack-merge";import{CUSTOMCONFIG as n}from"./commom/custom-config.mjs";import r from"./commom/paths.mjs";import{join as s}from"./commom/posix.mjs";import i from"./commom/setup-env.mjs";import m from"./options/jsx-dom-expressions.mjs";import l from"./options/split-chunk.mjs";import{getConfigWithTypescript as p,isFunction as c,node_modules as u,resolveProgram as d}from"./utils/index.mjs";import{initDts as f}from"./vm/dts.mjs";import{APPTYPE as h,FRAMEWORK as g,frameworkVersion as v,isCI as x,isDev as j,isLibrary as C,isMobile as P,isReact as b,jsxImportSource as k,mainDirectory as w,NODE_ENV as O,PACKAGENAME as I}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"];export async function getConfig(e){let o=p(e).default;return(c(o)?await o(t):o)??{}}let y=await i(O,h,g,[],"true"===t.env.IS_BUILD,n),[M,z]=await Promise.all([getConfig(r.configPath),getConfig(r.customConfigPath)]),D={mode:O,strict:!1,devtool:"true"!==t.env.IS_BUILD&&j?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:"",namespace:I,moduleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]",fallbackModuleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]"},env:y,basename:"/",publicPath:"auto",rem:{designSize:P?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":d(w)},b&&v<18?{"react/package.json":u("react/package.json"),"react/jsx-runtime":u("react/jsx-runtime.js"),"react/jsx-dev-runtime":u("react/jsx-dev-runtime.js")}:{}),moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3,open:!0},htmlPluginOption:{title:I.toLocaleUpperCase(),favicon:e(r.programPath,`${r.corePath}/options/favicon.ico`)},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:l,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:S,js:S,media:S,font:S,wasm:[]},mdx:{jsx:!1,development:j,jsxImportSource:k,providerImportSource:`@moneko/${g}/mdx`},jsxDomExpressions:m,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"!==g,bundleId:"com.moneko.bid",bundles:[],stylelint:{},eslint:{lintDirtyModulesOnly:!1},minChunkSize:1e3,compression:!1,manifest:{filename:"site.webmanifest"},corepack:!0,reactJsxRuntime:"automatic"};C&&(D.alias=Object.assign(D.alias,{"@pkg":r.componentsPath,[I]:r.componentsPath}));let F=D;if((!1===(F=a(F,M,z)).devtool||!1===F.sourceMap)&&(F.sourceMap=!1,F.devtool=!1),"true"===t.env.CODESPACES&&(F.devServer.https=!1),!1===F.devServer.https&&"darwin"===t.platform&&(F.devServer.open=!1),F.htmlPluginOption&&(F.htmlPluginOption.tags||(F.htmlPluginOption.tags=[]),F.fixBrowserRouter&&F.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))"}),F.manifest)){let e=F.manifest.publicPath??F.publicPath??"/";F.htmlPluginOption.tags.push({href:s("auto"===e?"/":e,F.manifest.filename).replaceAll(o,"/"),tag:"link",rel:"manifest"})}export const CONFIG=F;export const PUBLICPATH="auto"===CONFIG.publicPath?"":CONFIG.publicPath;f(CONFIG);
|