@moneko/core 3.0.0-beta.114 → 3.0.0-beta.115

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import{accessSync as e,constants as t}from"fs";import{join as o}from"path";import s from"readline";import i from"chalk";import{merge as r}from"webpack-merge";import{APPTYPE as n,CUSTOMCONFIG as l,FRAMEWORK as a,PACKAGENAME as c,PROGRAMPATH as m,jsxImportSource as p,pkgName as u}from"./process-env.js";import{isFunction as d,readConf as h,resolveProgramPath as g}from"./utils.js";export const ENTRYPATH={mobile:"mobile",site:"site","back-stage":"back-stage","single-spa":"single-spa",library:"library","single-component":"single-component"};let f=[`@moneko/${a}`,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design","@app"],x={chunks:"all",minSize:1024,minChunks:1,cacheGroups:{route:{test:/[\\/].git[\\/]router/,priority:-10,reuseExistingChunk:!0,name:"route"},example:{test:/[\\/].git[\\/]example/,priority:-10,reuseExistingChunk:!0,name:"example"}}};"single-component"===n&&(x=!1);let b={library:{"@":g("site"),"@pkg":g("components"),[c]:g("components")},"single-component":{[c]:g("umd")},mobile:{},site:{},"back-stage":{},"single-spa":{}},y={seo:!1,mode:"csr",compiler:"swc",bundleAnalyzer:{analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1},entry:{},minifier:{js:{},css:{}},sourceMap:{filename:"[file].map",publicPath:""},env:{},routeBaseName:"/",publicPath:"/",rem:{designSize:"mobile"===n?375:1680},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":g("src")},b[n]),layoutSider:{},moduleRules:[],prefixJsLoader:[],cssModules:[],importOnDemand:{},proxy:[],cacheDirectory:`${m}/node_modules/.temp_cache`,devServer:{allowedHosts:[".baidu.com"],host:"localhost",port:3e3,https:!1,compress:!1},htmlPluginOption:{template:`./node_modules/${u}/template/index.html`,favicon:`./node_modules/${u}/template/favicon.ico`,tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:x,runtimeChunk:"single",moduleFederation:[],rulesInclude:{less:f,css:f,js:f,media:f,fonts:f},mdx:{jsxImportSource:p,useDynamicImport:!0,remarkPlugins:[],rehypePlugins:[]},jsxDomExpressions:{moduleName:"solid-js/web",builtIns:["For","Show","Switch","Match","Suspense","SuspenseList","Portal","Index","Dynamic","ErrorBoundary"],contextToCustomElements:!0,wrapConditionals:!0,generate:"dom",hydratable:!1},bar:{name:"编译中",color:"#6f42c1"},virtualModule:{},normalizeCss:!0,externalsPresets:{}};export const log=e=>{s.cursorTo(process.stdout,0),process.stdout.write(e)};let w=y,C=null,k={},O={};try{C=o(m,"./config/index.ts"),e(C,t.R_OK)}catch(e){C=null}if(C)try{let e=(await h(C,"index")).default;k=d(e)?e(process):e}catch(e){process.stdout.write(i.red(e))}if(l){let s=null;try{s=o(m,`./config/${l}.ts`),e(s,t.R_OK)}catch(e){s=null}if(null!==s)try{let e=(await h(s,l)).default;O=d(e)?e(process):e}catch(e){process.stdout.write(i.red(e))}}"tsc"===(w=r(w,k,O)).compiler&&w.minifier&&(w.minifier.js||Object.assign(w.minifier,{js:{type:"terser"}}),w.minifier.css||Object.assign(w.minifier,{css:{type:"cssnano"}})),!1===w.devtool&&(w.sourceMap=!1),!1===w.sourceMap&&(w.devtool=!1),w.fixBrowserRouter&&w.htmlPluginOption&&(w.htmlPluginOption.tags||(w.htmlPluginOption.tags=[]),w.htmlPluginOption.tags.push({textContent:`
1
+ import{accessSync as e,constants as t}from"fs";import{join as o}from"path";import s from"readline";import r from"chalk";import{merge as i}from"webpack-merge";import{APPTYPE as n,CUSTOMCONFIG as l,FRAMEWORK as a,PACKAGENAME as c,PROGRAMPATH as m,jsxImportSource as p,pkgName as u}from"./process-env.js";import{isFunction as d,readConf as h,resolveProgramPath as g}from"./utils.js";export const ENTRYPATH={mobile:"mobile",site:"site",backstage:"backstage",micro:"micro",library:"library","single-component":"single-component"};let f=[`@moneko/${a}`,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design","@app"],x={chunks:"all",minSize:1024,minChunks:1,cacheGroups:{route:{test:/[\\/].git[\\/]router/,priority:-10,reuseExistingChunk:!0,name:"route"},example:{test:/[\\/].git[\\/]example/,priority:-10,reuseExistingChunk:!0,name:"example"}}};"single-component"===n&&(x=!1);let b={library:{"@":g("site"),"@pkg":g("components"),[c]:g("components")},"single-component":{[c]:g("umd")},mobile:{},site:{},backstage:{},micro:{}},y={seo:!1,mode:"csr",compiler:"swc",bundleAnalyzer:{analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1},entry:{},minifier:{js:{},css:{}},sourceMap:{filename:"[file].map",publicPath:""},env:{},routeBaseName:"/",publicPath:"/",rem:{designSize:"mobile"===n?375:1680},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":g("src")},b[n]),layoutSider:{},moduleRules:[],prefixJsLoader:[],cssModules:[],importOnDemand:{},proxy:[],cacheDirectory:`${m}/node_modules/.temp_cache`,devServer:{allowedHosts:[".baidu.com"],host:"localhost",port:3e3,https:!1,compress:!1},htmlPluginOption:{template:`./node_modules/${u}/template/index.html`,favicon:`./node_modules/${u}/template/favicon.ico`,tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:x,runtimeChunk:"single",moduleFederation:[],rulesInclude:{less:f,css:f,js:f,media:f,fonts:f},mdx:{jsxImportSource:p,useDynamicImport:!0,remarkPlugins:[],rehypePlugins:[]},jsxDomExpressions:{moduleName:"solid-js/web",builtIns:["For","Show","Switch","Match","Suspense","SuspenseList","Portal","Index","Dynamic","ErrorBoundary"],contextToCustomElements:!0,wrapConditionals:!0,generate:"dom",hydratable:!1},bar:{name:"编译中",color:"#6f42c1"},virtualModule:{},normalizeCss:!0,externalsPresets:{}};export const log=e=>{s.cursorTo(process.stdout,0),process.stdout.write(e)};let w=y,C=null,k={},O={};try{C=o(m,"./config/index.ts"),e(C,t.R_OK)}catch(e){C=null}if(C)try{let e=(await h(C,"index")).default;k=d(e)?e(process):e}catch(e){process.stdout.write(r.red(e))}if(l){let s=null;try{s=o(m,`./config/${l}.ts`),e(s,t.R_OK)}catch(e){s=null}if(null!==s)try{let e=(await h(s,l)).default;O=d(e)?e(process):e}catch(e){process.stdout.write(r.red(e))}}"tsc"===(w=i(w,k,O)).compiler&&w.minifier&&(w.minifier.js||Object.assign(w.minifier,{js:{type:"terser"}}),w.minifier.css||Object.assign(w.minifier,{css:{type:"cssnano"}})),!1===w.devtool&&(w.sourceMap=!1),!1===w.sourceMap&&(w.devtool=!1),w.fixBrowserRouter&&w.htmlPluginOption&&(w.htmlPluginOption.tags||(w.htmlPluginOption.tags=[]),w.htmlPluginOption.tags.push({textContent:`
2
2
  (function(l) {
3
3
  if (l.search[1] === '/' ) {
4
4
  var decoded = l.search.slice(1).split('&').map(function(s) {
@@ -1 +1 @@
1
- import{resolve as e}from"path";import s from"mini-css-extract-plugin";import o from"mini-svg-data-uri";import{CONFIG as t,PUBLICPATH as r}from"./common.js";import{hasPkg as l}from"./has-pkg.js";import a from"./modifyVars.js";import{APPTYPE as n,DEV as i,FRAMEWORK as c,__dirname as m}from"./process-env.js";import p from"./swcrc.js";import d from"./tsloader.config.js";import{resolveNodeModulesPath as u,resolveProgramPath as f}from"./utils.js";let y="single-spa"===n?r:"../",x={loader:s.loader,options:{publicPath:"/"!==y?y:"../"}},g=l("@moneko/postcss")&&{loader:"postcss-loader",options:{postcssOptions:await import("@moneko/postcss")}};i&&(x="style-loader");let $=[...t.cssModules,`@moneko/${c}`,"neko-ui"].map(u),j=[...["src/styles/variables/*.less","src/styles/mixins/*.less","site/styles/variables/*.less","site/styles/mixins/*.less"].map(f)],v=["components","example","mock","site","src","server"].map(f),b=[x,{loader:"@teamsupercell/typings-for-css-modules-loader",options:{verifyOnly:!i}},{loader:"css-loader",options:{modules:{auto:e=>{for(let s=0,o=$.length;s<o;s++)if(e&&e?.includes($[s]))return/(.*(?<!\.?global\.(le|c)ss)$)/i.test(e);return/(^(?!.*node_modules))(.*(?<!\.?global\.(le|c)ss)$)/i.test(e)},localIdentName:"[path][name]__[local]",exportLocalsConvention:"dashesOnly"},importLoaders:2}},g,"css-unicode-loader",{loader:"less-loader",options:{sourceMap:!!t.sourceMap,lessOptions:{modifyVars:a,javascriptEnabled:!0}}},{loader:"style-resources-loader",options:{patterns:j}}].filter(Boolean),w={loader:"tsc"===t.compiler?"ts-loader":"swc-loader",options:"tsc"===t.compiler?d:p(i)},h={rules:[{test:/\.mdx?$/,include:[f("components")],exclude:[/(.+)\/examples\/(.+).mdx?$/i],enforce:"pre",use:[{loader:e(m,"./loader/frontmatter.cjs")}]},{oneOf:[{resourceQuery:/raw/,type:"asset/source"},{test:/\.wasm$/,type:"webassembly/async"},{test:/\.txt$/,type:"asset/source"},{test:/\.(gif|png|jpe?g|ico|mp4)$/i,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/images/[name][ext][query]"},include:v.concat(t.rulesInclude?.media?.map(u)||[])},{test:/\.svg$/,type:"asset/inline",generator:{dataUrl:e=>o("string"!=typeof e?e.toString():e)}},{test:/\.(eot|ttf|otf|woff(|2))$/,type:"asset",generator:{filename:"assets/fonts/[name][ext][query]"},include:v.concat(t.rulesInclude?.fonts?.map(u)||[])},{test:/\.less$/,use:b,include:v.concat(t.rulesInclude?.less?.map(u)||[])},{test:/\.css$/,use:[x,"css-loader",g,"css-unicode-loader"].filter(Boolean),include:v.concat(t.rulesInclude?.css?.map(u)||[])},{test:/\.(cj|mj|t|j)s(|x)$/,use:[...t.prefixJsLoader,w].filter(Boolean),include:v.concat(t.rulesInclude?.js?.map(u)||[])},{test:/\.mdx?$/,use:[...t.prefixJsLoader,w,{loader:"@mdx-js/loader",options:t.mdx}].filter(Boolean),include:v,exclude:[/(.+)\/examples\/(.+).mdx?$/i]},{test:/\.mdx?$/,type:"asset/source",include:[/(.+)\/examples\/(.+).mdx?$/i]},{type:"asset/source",include:[/(.+)\/examples\/(.+).*?$/i]}]},...t.moduleRules]};export default h;
1
+ import{resolve as e}from"path";import s from"mini-css-extract-plugin";import o from"mini-svg-data-uri";import{CONFIG as t,PUBLICPATH as r}from"./common.js";import{hasPkg as l}from"./has-pkg.js";import a from"./modifyVars.js";import{APPTYPE as i,DEV as n,FRAMEWORK as c,__dirname as m}from"./process-env.js";import p from"./swcrc.js";import d from"./tsloader.config.js";import{resolveNodeModulesPath as u,resolveProgramPath as f}from"./utils.js";let y="micro"===i?r:"../",x={loader:s.loader,options:{publicPath:"/"!==y?y:"../"}},g=l("@moneko/postcss")&&{loader:"postcss-loader",options:{postcssOptions:await import("@moneko/postcss")}};n&&(x="style-loader");let $=[...t.cssModules,`@moneko/${c}`,"neko-ui"].map(u),j=[...["src/styles/variables/*.less","src/styles/mixins/*.less","site/styles/variables/*.less","site/styles/mixins/*.less"].map(f)],v=["components","example","mock","site","src","server"].map(f),b=[x,{loader:"@teamsupercell/typings-for-css-modules-loader",options:{verifyOnly:!n}},{loader:"css-loader",options:{modules:{auto:e=>{for(let s=0,o=$.length;s<o;s++)if(e&&e?.includes($[s]))return/(.*(?<!\.?global\.(le|c)ss)$)/i.test(e);return/(^(?!.*node_modules))(.*(?<!\.?global\.(le|c)ss)$)/i.test(e)},localIdentName:"[path][name]__[local]",exportLocalsConvention:"dashesOnly"},importLoaders:2}},g,"css-unicode-loader",{loader:"less-loader",options:{sourceMap:!!t.sourceMap,lessOptions:{modifyVars:a,javascriptEnabled:!0}}},{loader:"style-resources-loader",options:{patterns:j}}].filter(Boolean),w={loader:"tsc"===t.compiler?"ts-loader":"swc-loader",options:"tsc"===t.compiler?d:p(n)},h={rules:[{test:/\.mdx?$/,include:[f("components")],exclude:[/(.+)\/examples\/(.+).mdx?$/i],enforce:"pre",use:[{loader:e(m,"./loader/frontmatter.cjs")}]},{oneOf:[{resourceQuery:/raw/,type:"asset/source"},{test:/\.wasm$/,type:"webassembly/async"},{test:/\.txt$/,type:"asset/source"},{test:/\.(gif|png|jpe?g|ico|mp4)$/i,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/images/[name][ext][query]"},include:v.concat(t.rulesInclude?.media?.map(u)||[])},{test:/\.svg$/,type:"asset/inline",generator:{dataUrl:e=>o("string"!=typeof e?e.toString():e)}},{test:/\.(eot|ttf|otf|woff(|2))$/,type:"asset",generator:{filename:"assets/fonts/[name][ext][query]"},include:v.concat(t.rulesInclude?.fonts?.map(u)||[])},{test:/\.less$/,use:b,include:v.concat(t.rulesInclude?.less?.map(u)||[])},{test:/\.css$/,use:[x,"css-loader",g,"css-unicode-loader"].filter(Boolean),include:v.concat(t.rulesInclude?.css?.map(u)||[])},{test:/\.(cj|mj|t|j)s(|x)$/,use:[...t.prefixJsLoader,w].filter(Boolean),include:v.concat(t.rulesInclude?.js?.map(u)||[])},{test:/\.mdx?$/,use:[...t.prefixJsLoader,w,{loader:"@mdx-js/loader",options:t.mdx}].filter(Boolean),include:v,exclude:[/(.+)\/examples\/(.+).mdx?$/i]},{test:/\.mdx?$/,type:"asset/source",include:[/(.+)\/examples\/(.+).mdx?$/i]},{type:"asset/source",include:[/(.+)\/examples\/(.+).*?$/i]}]},...t.moduleRules]};export default h;
@@ -1 +1 @@
1
- import e from"fs";import t from"add-asset-html-webpack-plugin";import s from"html-webpack-plugin";import o from"webpack";import n from"webpackbar";import"./cleanup.js";import{CONFIG as l,PUBLICPATH as i}from"./common.js";import r from"./define.js";import a from"./done.js";import p from"./html-add-entry-attr.js";import m from"./html-plugin-option.js";import{moduleFederation as c}from"./module-federation.js";import u from"./module.config.js";import{APPTYPE as f,CUSTOMCONFIG as d,DEV as h,PACKAGENAME as j,PROGRAMPATH as y,hasEslintConfig as g,hasStylelintConfig as b}from"./process-env.js";import{seo as w}from"./seo.js";import{resolveNodeModulesPath as x,resolveProgramPath as k}from"./utils.js";import C from"./virtual-module-plugin.js";import v from"./virtual-modules.js";let{AutomaticPrefetchPlugin:$,DefinePlugin:O,SourceMapDevToolPlugin:B,WatchIgnorePlugin:P}=o,A=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],D=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],M=e.readdirSync(y),S=!1,T=!1;for(let e=0,t=M.length;e<t;e++)D.includes(M[e])&&(T=!0),A.includes(M[e])&&(S=!0);S||(S=g),T||(T=b);let K=T?(await import("stylelint-webpack-plugin")).default:null,L=S?(await import("eslint-webpack-plugin")).default:null,F=l.assetHtml.map(e=>({publicPath:"",...e}));export const outputConfig={path:k("library"===f?"docs":"dist"),filename:"js/[chunkhash].js",chunkFilename:"js/[chunkhash].js",assetModuleFilename:"assets/[hash][ext][query]",library:{name:j,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${j}`,pathinfo:h,clean:!0,publicPath:i,asyncChunks:!0};let N=x("@app/entry");"single-component"===f&&(N=k(h?"example/index.ts":"src/index.ts"),outputConfig.path=k(h?"dist":"umd"),outputConfig.filename="index.js",outputConfig.globalObject="this",outputConfig.library={export:"default",name:j,type:"umd",umdNamedDefine:!0});let R={main:N};l.entry&&("string"==typeof l.entry?R=l.entry:Object.keys(l.entry)&&Object.assign(R,l.entry)),l.output&&("string"==typeof l.output?outputConfig.path=l.output:Object.keys(l.output)&&Object.assign(outputConfig,l.output));let W=l.routeBaseName.split("/").filter(Boolean).length,_=`${Array(W).fill("..").join("/")+(W?"/":"")}404.html`,{pathSegmentsToKeep:q=W,path:G=_}=l.fixBrowserRouter||{},H=!1;l.cacheDirectory&&(H={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:l.cacheDirectory,memoryCacheUnaffected:!0,name:`${d||"default"}-${h?"development":"production"}`});export const clientConfig={entry:R,stats:"errors-only",cache:H,infrastructureLogging:{level:"none"},target:"web",externalsPresets:l.externalsPresets,plugins:[new $,...c,L&&new L({fix:!0,threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),K&&new K({fix:!0,threads:!0,extensions:["css","scss","sass","less","ts","tsx","js","jsx"],exclude:["node_modules/","es/","lib/","docs/","coverage/","dist/"]}),l.htmlPluginOption&&new s(m),l.fixBrowserRouter&&new s({filename:G,inject:!1,templateContent:()=>`<html html><head><title>${m.title}</title><script>var pathSegmentsToKeep = ${q||W};var l = window.location;l.replace(l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' + l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') + (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + l.hash);</script></head><body></body></html>`}),new t(F),"single-spa"===f&&new p(e=>!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))),new O(r),new P({paths:[/\.d\.ts$/]}),l.sourceMap&&new B(l.sourceMap),l.bar&&new n(l.bar),new a({done:()=>{!h&&l.seo&&w(),l.done?.(),h||setTimeout(()=>{process.exit(0)},2e3)}}),new C(v),...l.plugins].filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:l.alias,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:u,externals:l.externals,output:outputConfig};
1
+ import e from"fs";import t from"add-asset-html-webpack-plugin";import s from"html-webpack-plugin";import o from"webpack";import n from"webpackbar";import"./cleanup.js";import{CONFIG as l,PUBLICPATH as i}from"./common.js";import r from"./define.js";import a from"./done.js";import p from"./html-add-entry-attr.js";import m from"./html-plugin-option.js";import{moduleFederation as c}from"./module-federation.js";import u from"./module.config.js";import{APPTYPE as f,CUSTOMCONFIG as d,DEV as h,PACKAGENAME as j,PROGRAMPATH as y,hasEslintConfig as g,hasStylelintConfig as b}from"./process-env.js";import{seo as w}from"./seo.js";import{resolveNodeModulesPath as x,resolveProgramPath as k}from"./utils.js";import C from"./virtual-module-plugin.js";import v from"./virtual-modules.js";let{AutomaticPrefetchPlugin:$,DefinePlugin:O,SourceMapDevToolPlugin:B,WatchIgnorePlugin:P}=o,A=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],D=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],M=e.readdirSync(y),S=!1,T=!1;for(let e=0,t=M.length;e<t;e++)D.includes(M[e])&&(T=!0),A.includes(M[e])&&(S=!0);S||(S=g),T||(T=b);let K=T?(await import("stylelint-webpack-plugin")).default:null,L=S?(await import("eslint-webpack-plugin")).default:null,F=l.assetHtml.map(e=>({publicPath:"",...e}));export const outputConfig={path:k("library"===f?"docs":"dist"),filename:"js/[chunkhash].js",chunkFilename:"js/[chunkhash].js",assetModuleFilename:"assets/[hash][ext][query]",library:{name:j,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${j}`,pathinfo:h,clean:!0,publicPath:i,asyncChunks:!0};let N=x("@app/entry");"single-component"===f&&(N=k(h?"example/index.ts":"src/index.ts"),outputConfig.path=k(h?"dist":"umd"),outputConfig.filename="index.js",outputConfig.globalObject="this",outputConfig.library={export:"default",name:j,type:"umd",umdNamedDefine:!0});let R={main:N};l.entry&&("string"==typeof l.entry?R=l.entry:Object.keys(l.entry)&&Object.assign(R,l.entry)),l.output&&("string"==typeof l.output?outputConfig.path=l.output:Object.keys(l.output)&&Object.assign(outputConfig,l.output));let W=l.routeBaseName.split("/").filter(Boolean).length,_=`${Array(W).fill("..").join("/")+(W?"/":"")}404.html`,{pathSegmentsToKeep:q=W,path:G=_}=l.fixBrowserRouter||{},H=!1;l.cacheDirectory&&(H={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:l.cacheDirectory,memoryCacheUnaffected:!0,name:`${d||"default"}-${h?"development":"production"}`});export const clientConfig={entry:R,stats:"errors-only",cache:H,infrastructureLogging:{level:"none"},target:"web",externalsPresets:l.externalsPresets,plugins:[new $,...c,L&&new L({fix:!0,threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),K&&new K({fix:!0,threads:!0,extensions:["css","scss","sass","less","ts","tsx","js","jsx"],exclude:["node_modules/","es/","lib/","docs/","coverage/","dist/"]}),l.htmlPluginOption&&new s(m),l.fixBrowserRouter&&new s({filename:G,inject:!1,templateContent:()=>`<html html><head><title>${m.title}</title><script>var pathSegmentsToKeep = ${q||W};var l = window.location;l.replace(l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' + l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') + (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + l.hash);</script></head><body></body></html>`}),new t(F),"micro"===f&&new p(e=>!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))),new O(r),new P({paths:[/\.d\.ts$/]}),l.sourceMap&&new B(l.sourceMap),l.bar&&new n(l.bar),new a({done:()=>{!h&&l.seo&&w(),l.done?.(),h||setTimeout(()=>{process.exit(0)},2e3)}}),new C(v),...l.plugins].filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:l.alias,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:u,externals:l.externals,output:outputConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.0.0-beta.114",
3
+ "version": "3.0.0-beta.115",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -20,8 +20,8 @@ export declare type AppType =
20
20
  | 'single-component'
21
21
  | 'mobile'
22
22
  | 'site'
23
- | 'back-stage'
24
- | 'single-spa'
23
+ | 'backstage'
24
+ | 'micro'
25
25
  | 'library';
26
26
  export declare type Framework = 'react' | 'solid';
27
27
  export type TerserOptions = MinifyOptions;
@@ -443,7 +443,7 @@ export type ProgramInfoType = {
443
443
  /** 应用版本 */
444
444
  version: string;
445
445
  /** 应用类型 */
446
- type: 'mobile' | 'site' | 'back-stage' | 'single-spa' | 'library';
446
+ type: 'mobile' | 'site' | 'backstage' | 'micro' | 'library';
447
447
  /** 开发者 */
448
448
  author: {
449
449
  name: string;