@moneko/core 3.24.7 → 3.24.8
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/build/common.mjs +1 -1
- package/lib/common.mjs +1 -1
- package/lib/config.mjs +1 -1
- package/package.json +1 -1
package/lib/build/common.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"mini-css-extract-plugin";import i from"terser-webpack-plugin";import n from"webpack";import{BundleAnalyzerPlugin as m}from"webpack-bundle-analyzer";import{merge as r}from"webpack-merge";import{commonConfig as t}from"../common.mjs";import{CONFIG as o}from"../config.mjs";import{getMinifyOption as
|
|
1
|
+
import e from"mini-css-extract-plugin";import i from"terser-webpack-plugin";import n from"webpack";import{BundleAnalyzerPlugin as m}from"webpack-bundle-analyzer";import{merge as r}from"webpack-merge";import{commonConfig as t}from"../common.mjs";import{CONFIG as o}from"../config.mjs";import{getMinifyOption as s}from"../options/js-minify.mjs";import{LightningCssMinifyPlugin as l}from"../plugin/lightningcss-plugin.mjs";import{getLightningCssTargets as p}from"../polyfills/targets.mjs";let{optimize:{MinChunkSizePlugin:a}}=n,u=[];o.minifier&&(u.push(new i(s(o.minifier.type,o.minifier.options))),u.push(new l({targets:p()})));let f={maxAssetSize:256e3,maxEntrypointSize:256e3,assetFilter:e=>!e.endsWith(".map")&&!e.endsWith("ce28377f3a428346.js"),...o.performance},c=r(t,{performance:o.performance&&f,plugins:[new e({filename:"style/[name].bundle.css",chunkFilename:"style/[name].chunk.css",ignoreOrder:!0}),o.splitChunk&&new a({minChunkSize:1e4}),o.bundleAnalyzer&&new m({analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1,defaultSizes:"gzip",logLevel:"silent",...o.bundleAnalyzer})].filter(Boolean),optimization:{splitChunks:o.splitChunk,runtimeChunk:o.runtimeChunk,chunkIds:"deterministic",moduleIds:"deterministic",removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,minimize:!0,minimizer:u}});export default c;
|
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{NODE_ENV as i,PACKAGENAME as l,PACKAGEVERSION as r,isDev as m,isLibrary as p}from"./process-env.mjs";import{isObject as c,node_modules as u,resolveProgram as h}from"./utils/index.mjs";import{join as d,resolve as f,extname as g}from"path";import{exampleModuleName as y}from"./vm/example.mjs";import b from"./vm/info.mjs";export const outputConfig={path:h(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${m?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=g(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:`${b.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${l}`,pathinfo:m,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"anonymous",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let j={main:[e.polyfill&&d(o.corePath,"./polyfills/replace-children.mjs"),u("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?j={main:[e.entry]}:Object.keys(e.entry)&&(j=Object.assign(j,e.entry))),"string"==typeof j.main&&(j.main=[j.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let v={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,name:`.${[a,i].filter(Boolean).join("-")}`,version:`${r}`};!1===e.cache?v=!1:c(e.cache)&&(v=Object.assign(v,e.cache));let C=Object.assign({original:e.alias["@"],override:a&&h(a)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:j,mode:m?"development":"production",stats:"errors-only",cache:v,snapshot:{immutablePaths:[/node_modules\/(?!@app\/(?:locales|router|example|comment|docs)(?:\/|$))/],managedPaths:[/^@app\/.+/],buildDependencies:{timestamp:!0}},infrastructureLogging:{level:"error"},
|
|
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{NODE_ENV as i,PACKAGENAME as l,PACKAGEVERSION as r,isDev as m,isLibrary as p}from"./process-env.mjs";import{isObject as c,node_modules as u,resolveProgram as h}from"./utils/index.mjs";import{join as d,resolve as f,extname as g}from"path";import{exampleModuleName as y}from"./vm/example.mjs";import b from"./vm/info.mjs";export const outputConfig={path:h(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${m?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=g(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:`${b.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${l}`,pathinfo:m,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"anonymous",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let j={main:[e.polyfill&&d(o.corePath,"./polyfills/replace-children.mjs"),u("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?j={main:[e.entry]}:Object.keys(e.entry)&&(j=Object.assign(j,e.entry))),"string"==typeof j.main&&(j.main=[j.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let v={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,name:`.${[a,i].filter(Boolean).join("-")}`,version:`${r}`};!1===e.cache?v=!1:c(e.cache)&&(v=Object.assign(v,e.cache));let C=Object.assign({original:e.alias["@"],override:a&&h(a)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:j,mode:m?"development":"production",stats:"errors-only",cache:v,snapshot:{immutablePaths:[/node_modules\/(?!@app\/(?:locales|router|example|comment|docs)(?:\/|$))/],managedPaths:[/^@app\/.+/],buildDependencies:{timestamp:!0}},infrastructureLogging:{level:"error"},externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:e.lazyCompilation&&m&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(u(y))||t.startsWith(u("@app/comment"))||t.startsWith(o.pagesPath)||t.startsWith(o.componentsPath)))}},buildHttp:c(e.buildHttp)?{allowedUris:[],lockfileLocation:f(o.httpCachePath,"http.lock"),cacheLocation:f(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(C),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},externals:e.externals,output:outputConfig};
|
package/lib/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import s from"./paths.mjs";import{APPTYPE as n,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as
|
|
1
|
+
import{merge as e}from"webpack-merge";import o from"./options/jsx-dom-expressions.mjs";import t from"./options/split-chunk.mjs";import s from"./paths.mjs";import{APPTYPE as n,FRAMEWORK as i,NODE_ENV as r,PACKAGENAME as l,isDev as a,isLibrary as m,isMobile as p,jsxImportSource as u,mainDirectory as c}from"./process-env.mjs";import{isFunction as d,resolveProgram as f}from"./utils/index.mjs";import h from"./utils/setup-env.mjs";import{fileExists as g}from"@moneko/utils";import x from"./utils/require.mjs";let v=["@app","@moneko","neko-ui",".cache/http/data","@ant-design","@element-plus","ant-design-vue","antd","antd-mini","antd-mobile","antd-mobile-icons","element-plus","element-ui","ng-zorro-antd","@antv","@mui","@du","ahooks","rc-queue-anim","umi","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design"],P={devtool:a?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,mode:"csr",bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:""},env:await h(r,n,i),basename:"/",publicPath:"/",rem:{designSize:p?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{"@":f(c)},moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3},htmlPluginOption:{},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:t,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:v,js:v,media:v,font:v,wasm:[]},mdx:{jsx:!1,development:a,jsxImportSource:u,providerImportSource:`@moneko/${i}/mdx`},jsxDomExpressions:o,bar:{name:"Client",color:"#6f42c1"},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:!0};function j(e){if(g(e)){let o=x(e).default;return d(o)?o(process):o}return{}}m&&(P.alias=Object.assign(P.alias,{"@pkg":s.componentsPath,[l]:s.componentsPath}));let w=P;(!1===(w=e(w,j(s.configPath),j(s.customConfigPath))).devtool||!1===w.sourceMap)&&(w.sourceMap=!1,w.devtool=!1),w.fixBrowserRouter&&w.htmlPluginOption&&(w.htmlPluginOption.tags||(w.htmlPluginOption.tags=[]),w.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))"}));export const CONFIG=w;export const PUBLICPATH=CONFIG.publicPath;
|