@moneko/core 3.0.0-beta.47 → 3.0.0-beta.49
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 +1 -1
- package/lib/generate-api.d.ts +1 -0
- package/lib/generate-api.js +10 -0
- package/lib/process-env.d.ts +3 -2
- package/lib/process-env.js +1 -1
- package/lib/routes.d.ts +1 -1
- package/lib/routes.js +1 -1
- package/lib/webpack.common.d.ts +2 -0
- package/lib/webpack.common.js +1 -1
- package/package.json +1 -1
package/lib/common.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"fs";import t from"path";import o from"readline";import s from"chalk";import{merge as i}from"webpack-merge";import{APPTYPE as n,CUSTOMCONFIG as r,FRAMEWORK as l,jsxImportSource as a,pkgName as c,PROGRAMPATH as m}from"./process-env.js";import{isFunction as p,readConf as u}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 d=[`@moneko/${l}`,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design"],h={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&&(h=!1);let g={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:"/",designSize:"mobile"===n?375:1680,fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{},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/${c}/template/index.html`,favicon:`./node_modules/${c}/template/favicon.ico`,tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:h,runtimeChunk:"single-component"!==n&&"single",moduleFederation:[],rulesInclude:{less:d,css:d,js:d,media:d,fonts:d},mdx:{jsxImportSource:a,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"}};export const log=e=>{o.cursorTo(process.stdout,0),process.stdout.write(e)};let f=g,
|
|
1
|
+
import e from"fs";import t from"path";import o from"readline";import s from"chalk";import{merge as i}from"webpack-merge";import{APPTYPE as n,CUSTOMCONFIG as r,FRAMEWORK as l,jsxImportSource as a,pkgName as c,PROGRAMPATH as m}from"./process-env.js";import{isFunction as p,readConf as u}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 d=[`@moneko/${l}`,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design"],h={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&&(h=!1);let g={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:"/",designSize:"mobile"===n?375:1680,fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{},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/${c}/template/index.html`,favicon:`./node_modules/${c}/template/favicon.ico`,tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:h,runtimeChunk:"single-component"!==n&&"single",moduleFederation:[],rulesInclude:{less:d,css:d,js:d,media:d,fonts:d},mdx:{jsxImportSource:a,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"}};export const log=e=>{o.cursorTo(process.stdout,0),process.stdout.write(e)};let f=g,y=null,x={},b={};try{y=t.join(m,"./config/index.ts"),e.accessSync(y,e.constants.R_OK)}catch(e){y=null}if(y)try{let e=(await u(y,"index")).default;x=p(e)?e(process):e}catch(e){process.stdout.write(s.red(e))}if(r){let o=null;try{o=t.join(m,`./config/${r}.ts`),e.accessSync(o,e.constants.R_OK)}catch(e){o=null}if(null!==o)try{let e=(await u(o,r)).default;b=p(e)?e(process):e}catch(e){process.stdout.write(s.red(e))}}"tsc"===(f=i(f,x,b)).compiler&&f.minifier&&(f.minifier.js||Object.assign(f.minifier,{js:{type:"terser"}}),f.minifier.css||Object.assign(f.minifier,{css:{type:"cssnano"}})),!1===f.devtool&&(f.sourceMap=!1),!1===f.sourceMap&&(f.devtool=!1),f.fixBrowserRouter&&f.htmlPluginOption&&(f.htmlPluginOption.tags||(f.htmlPluginOption.tags=[]),f.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) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{readdir as e,stat as t,access as n,constants as r,existsSync as i,mkdirSync as l,readFile as s,readFileSync as o,rmdirSync as u,statSync as c,watch as p,writeFile as a,unlink as f}from"fs";import{join as g}from"path";import d from"typescript";import{APPTYPE as m,PROGRAMPATH as y,frameworkCacheDir as $}from"./process-env.js";let{ScriptKind:x,ScriptTarget:h,createSourceFile:b,forEachChild:F,getLeadingCommentRanges:T,isInterfaceDeclaration:C,isQuestionToken:S,isPropertySignature:j}=d;function D(e){let t=T(e.getSourceFile().text,e.pos);if(t){let n=e.getSourceFile().text.substring(t[0].pos,t[0].end);return n.replace(/\/\*\*?\s*|\s*\*\//g,"").trim()}return null}function k(e){if(!e)return null;let t=e.match(/@since\s+([^\n]+)/);return t?t[1].trim():null}function B(e){return e?.replace(/\*/g,"\\*").replace(/\|/g,"\\|")||"-"}let E=["#9C27B0","#673AB7","#3F51B5","#2196F3","#00BCD4","#009688","#4CAF50","#CDDC39","#FF9800","#795548"];function v(e){return e?e.replace(/\* @default\s+([^(|\n)]+)/,"").replace(/\* @since\s+([^\n]+)/,"").replace(/\* @see\s+{@link\s+(.+?)(?:\|(.+?))?}/,"").replace(/(\n\s+)+/g,"<br />").replace(/(<br \/>)$/g,""):null}function K(){}let O=g($,"./apis"),q={};function w(e,t){i($)||l($),i(O)||l(O);let n=e.split("/").slice(-2),r=g(O,n[0]),u=n[1].replace(/\.tsx?/,".md");i(r)||l(r),q[n[0]]||(q[n[0]]=[]);let c=q[n[0]].indexOf(u),p=g(r,u);if("deleted"===t)f(p,K),-1!==c&&q[n[0]].splice(c,1);else{let t=function(e){let t=o(e,"utf-8"),n=b(e,t,h.Latest,!0,x.TS),r="";return F(n,e=>{C(e)?r+=function(e){let t=D(e),n=k(t),r=v(t),i=e.name.text,l=r?`<n-typography type="secondary">${i}</n-typography>`:i,s=(function(e){let t=[];if(e.heritageClauses){for(let n of e.heritageClauses)if(n.token===d.SyntaxKind.ExtendsKeyword)for(let e of n.types)t.push(e.getText())}return t})(e)?.map((e,t)=>`<n-tag color="${E[t]}">${e}</n-tag>`),o=[r,l,n&&`<sup><n-typography type="success">${n}</n-typography></sup>`,s.length>0&&`<sub>\`extends\`</sub> ${s.join(" ")}`].filter(Boolean).join(" "),u=`## ${o}
|
|
2
|
+
|
|
3
|
+
| 属性 | 必要 | 说明 | 类型 | 默认值 | 版本 |
|
|
4
|
+
| -- | -- | -- | -- | -- | -- |
|
|
5
|
+
`;for(let t of e.members)if(j(t)){let e=B(t.name.getText()),n=t.questionToken&&S(t.questionToken),r=D(t),i=B(function(e){if(!e)return null;let t=e.match(/@default\s+([^\n]+)/);return t?t[1].trim():null}(r)),l=B(k(r)),s=function(e,t){if(!e||!t)return null;let n=e.match(/@see\s+{@link\s+([^|}]+)(?:\|([^}]+))?}/);if(n){let e=n[2]||t;return t.replace(new RegExp(e),`[${e}](${n[1]})`)}return t}(r,B(t.type?.getText())),o=B(v(r)),c=`<n-typography type="${n?"error":"success"}">${n?"✘":"✔"}</n-typography>`;u+=`| ${e} | ${c} | ${o} | ${s} | ${i} | ${l} |
|
|
6
|
+
`}return u+"\n"}(e):d.isEnumDeclaration(e)&&(r+=function(e){let t=e.name.text,n=`## ${t}
|
|
7
|
+
| 属性 | 说明 | 值 | 版本 |
|
|
8
|
+
| -- | -- | -- | -- |
|
|
9
|
+
`;for(let t of e.members){let e=B(t.name.getText()),r=D(t),i=B(function(e){let t=e.initializer;return t&&d.isStringLiteral(t)?` '${t.text}'`:null}(t)),l=B(k(r)),s=B(r?.replace(/\* @since\s+([^\n]+)/,"").replace(/(\n\s+)+/g,"<br />").replace(/(<br \/>)$/g,""));n+=`| ${e} | ${s} | ${i} | ${l} |
|
|
10
|
+
`}return n+"\n"}(e))}),r}(e);t?(a(p,t,"utf-8",K),-1===c&&q[n[0]].push(u)):(f(p,K),-1!==c&&q[n[0]].splice(c,1))}s(g(O,"index.js"),{encoding:"utf-8"},(e,t)=>{let n=`export default ${JSON.stringify(q)};`;if(e){a(g(O,"index.js"),n,"utf-8",K);return}t!==n&&a(g(O,"index.js"),n,"utf-8",K)})}if("library"===m){let i=g(y,"./components");!function n(r,i=1){e(r,(e,l)=>{e||l.forEach(e=>{let l=g(r,e);t(l,(t,r)=>{!t&&(i?r.isDirectory()&&n(l,i-1):r.isFile()&&(e.endsWith(".ts")||e.endsWith(".tsx"))&&w(l,"added"))})})})}(i),function(e){p(e,{recursive:!0},(t,i)=>{let l=g(e,i||"");c(l).isDirectory()||("change"===t?w(l,t):"rename"===t&&n(l,r.F_OK,e=>{e?w(l,"deleted"):w(l,"added")}))})}(i),process.on("SIGINT",function(){try{u(O,{recursive:!0})}catch(e){}process.exit()})}
|
package/lib/process-env.d.ts
CHANGED
|
@@ -8,11 +8,12 @@ export declare const jsxImportSource: string;
|
|
|
8
8
|
export declare const PROGRAMPATH: string;
|
|
9
9
|
export declare const PACKAGENAME: string;
|
|
10
10
|
export declare const PACKAGEVERSION: string;
|
|
11
|
-
export declare const cacheDir: string;
|
|
12
11
|
export declare const pkgName: string;
|
|
12
|
+
export declare const DEV: boolean;
|
|
13
|
+
export declare const frameworkCacheDir: ".git/" | `node_modules/.cache/${string}`;
|
|
14
|
+
export declare const cacheDir: string;
|
|
13
15
|
export declare const NODE_ENV: string | undefined;
|
|
14
16
|
export declare const CUSTOMCONFIG: string | undefined;
|
|
15
|
-
export declare const DEV: boolean;
|
|
16
17
|
export declare let hasEslintConfig: boolean;
|
|
17
18
|
export declare let hasStylelintConfig: boolean;
|
|
18
19
|
export declare const hasAntd: boolean;
|
package/lib/process-env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFileSync as e,existsSync as o,mkdirSync as r}from"fs";import{join as
|
|
1
|
+
import{readFileSync as e,existsSync as o,mkdirSync as r}from"fs";import{join as t}from"path";import s from"url";import{hasPkg as n}from"./has-pkg.js";import{resolveProgramPath as p}from"./utils.js";import c from"./yarn-argv.js";export const __dirname=s.fileURLToPath(new URL(".",import.meta.url));export const APPTYPE=process.env.APPTYPE;export const FRAMEWORK=process.env.FRAMEWORK;export const isReact="react"===FRAMEWORK;export const isSolid="solid-js"===FRAMEWORK;export const jsxImportSource={react:"react","solid-js":"solid-js/h"}[FRAMEWORK];export const PROGRAMPATH=process.cwd();export const PACKAGENAME=process.env.npm_package_name;export const PACKAGEVERSION=process.env.npm_package_version;let a=e(t(__dirname,"../package.json"),{encoding:"utf-8"});export const pkgName=JSON.parse(a).name;export const DEV="development"===process.env.NODE_ENV;export const frameworkCacheDir=p(DEV?".git/":`node_modules/.cache/${PACKAGENAME}`);export const cacheDir=t(PROGRAMPATH,"./node_modules/.cache/@moneko/cli/");o(cacheDir)||r(cacheDir,{recursive:!0});export const NODE_ENV=process.env.NODE_ENV;export const CUSTOMCONFIG=process.env.npm_config_config||c.config;export let hasEslintConfig=!!Object.keys(process.env).filter(e=>e.startsWith("npm_package_eslintConfig_")).length;export let hasStylelintConfig=!!Object.keys(process.env).filter(e=>e.startsWith("npm_package_stylelint_")).length;export const hasAntd=n("antd");export const programInfo={name:PACKAGENAME,version:PACKAGEVERSION,type:APPTYPE,description:process.env.npm_package_description,author:{name:process.env.npm_package_author_name,email:process.env.npm_package_author_email,url:process.env.npm_package_author_url},repository:{type:process.env.npm_package_repository_type,url:process.env.npm_package_repository_url,directory:process.env.npm_package_repository_directory}};if(parseInt(process.versions.node)>14){let o=e(p("package.json"),{encoding:"utf-8"}),{description:r,author:t,repository:s,eslintConfig:n,stylelint:c}=JSON.parse(o);programInfo.author="string"==typeof t?{name:t}:t,programInfo.repository="string"==typeof t?{url:s}:s,programInfo.description=r,hasEslintConfig=!!n,hasStylelintConfig=!!c}
|
package/lib/routes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
package/lib/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e,
|
|
1
|
+
let e,t;import{readdirSync as r,statSync as o,writeFile as n,readFileSync as s,existsSync as i,mkdirSync as c,unlinkSync as l}from"fs";import{join as m,relative as p}from"path";import{watch as a}from"chokidar";import{load as u}from"js-yaml";import{PROGRAMPATH as f,APPTYPE as d,FRAMEWORK as h,DEV as g,frameworkCacheDir as j}from"./process-env.js";let $=/^---\n([\s\S]+?)\n---\n/;function x(e,t){let{regex:n,alia:i,base:c=e,outputSource:l}=t,a=r(e);return a.reduce((r,a)=>{let f=m(e,a),d=o(f);if(d.isDirectory()){let e=x(f,{...t,base:c});if(e.length>0){let t={},o={path:a,key:p(c,f)};if(l)Object.assign(t,{children:e});else{let r=e.splice(0,1)[0];e.length?Object.assign(t,{children:[{...r,path:"/",key:o.key},...e]}):Object.assign(t,r)}r.push(Object.assign(t,o))}}else if(n.test(f)){let e=s(f,{encoding:"utf-8"}),t=function(e){let t=e.match($);return t&&t[1]?t[1].trim():null}(e),o=t?u(t):{},n=p(c,f);r.push(Object.assign({path:a,key:n,meta:{...o}},i&&{component:`rr(() => import(/* webpackChunkName: '${n}' */'${m(i,n)}'))rr`},l&&{codes:function(e){let t;let r={},o=/```(.+?)\n([\s\S]*?)\n```/g;for(;null!==(t=o.exec(e));){let[,e="jsx",o]=t,n=e.split(" ").pop()||"jsx";r[n]=o.trim()}return Object.keys(r).length?r:{jsx:e}}(e.replace($,"").replace(/^\n+|\n+$/g,""))}))}return r},[])}let y=m(f,"./components");function k(e){if(e)throw e}function b(){e&&clearTimeout(e),e=setTimeout(()=>{let e={react:"createElement","solid-js":"createComponent"}[h],t=`() => ${e}(SuspenseComp, { comp: $1 })`,r=`import { ${e} } from "${h}";import { SuspenseComp } from "@moneko/${h}";`;["react","solid-js"].includes(h)||(t="$1",r="");let o=JSON.stringify(x(y,{regex:/README\.mdx?$/,alia:"@pkg"})).replace(/"rr\((.+?)\)rr"/g,t);i(j)||c(j),n(m(j,"route.js"),`${r}export default ${o}`,"utf-8",k)},100)}function O(){t&&clearTimeout(t),i(j)||c(j),t=setTimeout(()=>{let e=Object.fromEntries(x(y,{regex:/\/examples\/(.+)\.md$/,outputSource:!0}).map(e=>[e.key,e.children?.[0].children?.filter(e=>e.codes)?.map(e=>({title:e.path.replace(/.md$/,""),order:0,...e.meta,codes:e.codes})).sort((e,t)=>e.order-t.order)]));n(m(j,"example.js"),`export default ${JSON.stringify(e)}`,"utf-8",k)},100)}function S(e,t,r){let o=a(e,{ignored:(e,r)=>{if(r)return!r?.isDirectory()&&t.test(e)},persistent:!0});o.on("add",()=>{r()}).on("change",()=>{r()}).on("unlink",()=>{r()})}"library"===d&&(g?(S(y,/(?<!README\.mdx?)$/,b),S(y,/(?<!\/examples\/(.+)\.md)$/,O)):(b(),O())),process.on("SIGINT",function(){(function(){try{l(m(j,"example.js"))}catch(e){}try{l(m(j,"route.js"))}catch(e){}})(),process.exit()});
|
package/lib/webpack.common.d.ts
CHANGED
package/lib/webpack.common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"fs";import t from"add-asset-html-webpack-plugin";import s from"html-webpack-plugin";import n from"webpack";import o from"webpackbar";import{CONFIG as l,ENTRYPATH as i,PUBLICPATH as r}from"./common.js";import a from"./done.js";import p from"./envFlags.js";import m from"./html-add-entry-attr.js";import c from"./html-plugin-option.js";import{moduleFederation as u}from"./module-federation.js";import f from"./module.config.js";import{APPTYPE as d,DEV as g,hasEslintConfig as j,hasStylelintConfig as h,PACKAGENAME as b,PROGRAMPATH as y,FRAMEWORK as w}from"./process-env.js";import
|
|
1
|
+
import e from"fs";import t from"add-asset-html-webpack-plugin";import s from"html-webpack-plugin";import n from"webpack";import o from"webpackbar";import{CONFIG as l,ENTRYPATH as i,PUBLICPATH as r}from"./common.js";import a from"./done.js";import p from"./envFlags.js";import m from"./html-add-entry-attr.js";import c from"./html-plugin-option.js";import{moduleFederation as u}from"./module-federation.js";import f from"./module.config.js";import{APPTYPE as d,DEV as g,hasEslintConfig as j,hasStylelintConfig as h,PACKAGENAME as b,PROGRAMPATH as y,FRAMEWORK as w,frameworkCacheDir as x}from"./process-env.js";import"./routes.js";import{seo as k}from"./seo.js";import{resolveNodeModulesPath as v,resolveProgramPath as C}from"./utils.js";import"./generate-api.js";let O=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],P=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],$=e.readdirSync(y),T=!1,A=!1;for(let e=0,t=$.length;e<t;e++)P.includes($[e])&&(A=!0),O.includes($[e])&&(T=!0);T||(T=j),A||(A=h);let B=A?(await import("stylelint-webpack-plugin")).default:null,S=T?(await import("eslint-webpack-plugin")).default:null,M={"@":C("src"),"@framework-cache-dir":x};Object.assign(M,l.alias),"library"===d&&Object.assign(M,{"@":C("site"),"@pkg":C("components"),[b]:C("components")});let F=l.assetHtml.map(e=>({publicPath:"",...e}));export const outputConfig={path:C("library"===d?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:"js/[name].chunk.js",assetModuleFilename:"assets/[name].[hash][ext]",library:b,libraryTarget:"window",globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${b}`,pathinfo:!1,clean:!0,publicPath:r};let K=v(`@moneko/${w}/lib/packages/${i[d]}/index.js`);"single-component"===d&&(Object.assign(M,{[b]:C("umd")}),K=C(g?"example/index.ts":"src/index.ts"),outputConfig.path=C(g?"dist":"umd"),outputConfig.filename="index.js",outputConfig.library=b,outputConfig.libraryTarget="umd",outputConfig.libraryExport="default");let L={main:K};l.entry&&("string"==typeof l.entry?L=l.entry:Object.keys(l.entry)&&Object.assign(L,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,D=Array(W).fill("..").join("/")+(W?"/":"")+"404.html",{pathSegmentsToKeep:R=W,path:_=D}=l.fixBrowserRouter||{},E={entry:L,stats:"errors-only",infrastructureLogging:{level:"none"},target:"web",plugins:[new n.AutomaticPrefetchPlugin,...u,S&&new S({fix:!0,threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),B&&new B({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(c),l.fixBrowserRouter&&new s({filename:_,inject:!1,templateContent:()=>`<html html><head><title>${c.title}</title><script>var pathSegmentsToKeep = ${R||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"===d&&new m(e=>!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))),new n.DefinePlugin(p),new n.WatchIgnorePlugin({paths:[/\.d\.ts$/]}),l.sourceMap&&new n.SourceMapDevToolPlugin(l.sourceMap),l.bar&&new o(l.bar),new a({done:()=>{!g&&l.seo&&k(),l.done?.()}}),...l.plugins].filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:M,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:f,externals:l.externals,output:outputConfig};export default E;
|