@moneko/core 2.0.53-beta.8 → 2.0.53-beta.9

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/build/common.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _export(e,n){for(var t in n)Object.defineProperty(e,t,{enumerable:!0,get:n[t]})}Object.defineProperty(exports,"__esModule",{value:!0}),_export(exports,{ENTRYPATH:function(){return ENTRYPATH},log:function(){return log},CONFIG:function(){return CONFIG},PUBLICPATH:function(){return PUBLICPATH}});var _customConf_minifier,_customConf_minifier_js,_customConf_minifier1,_customConf_minifier_css,_fs=_interopRequireDefault(require("fs")),_path=_interopRequireDefault(require("path")),_readline=_interopRequireDefault(require("readline")),_chalk=_interopRequireDefault(require("chalk")),_webpackMerge=require("webpack-merge"),_processEnv=require("./process-env"),_utils=require("./utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var ENTRYPATH={mobile:"mobile",site:"site","back-stage":"back-stage","single-spa":"single-spa",library:"library","single-component":"single-component"},includeModule=[_processEnv.pkgName,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design"],defaultSplitChunk={chunks:"all",minSize:1024,minChunks:1};"single-component"===_processEnv.APPTYPE&&(defaultSplitChunk=!1);var defaultConfig={seo:!1,mode:"csr",compiler:"swc",emotion:{sourceMap:!0,autoLabel:"dev-only",labelFormat:"n-[local]"},bundleAnalyzer:{analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1},entry:{},minifier:{js:{},css:{}},sourceMap:{filename:"[file].map",publicPath:""},env:{},routeBaseName:"/",publicPath:"/",designSize:"mobile"===_processEnv.APPTYPE?375:1680,fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{},layoutSider:{},moduleRules:[],prefixJsLoader:[],cssModules:[],importOnDemand:{},proxy:[],cacheDirectory:_processEnv.PROGRAMPATH+"/node_modules/.temp_cache",devServer:{allowedHosts:[".baidu.com"],host:"localhost",port:3e3,https:!1,compress:!1},htmlPluginOption:{template:"./node_modules/"+_processEnv.pkgName+"/template/index.html",favicon:"./node_modules/"+_processEnv.pkgName+"/template/favicon.ico",tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:defaultSplitChunk,runtimeChunk:"single-component"!==_processEnv.APPTYPE&&"single",moduleFederation:[],rulesInclude:{less:includeModule,css:includeModule,js:includeModule,media:includeModule,fonts:includeModule}},log=function(e){_readline.default.cursorTo(process.stdout,0),process.stdout.write(e)},customConf=defaultConfig,configPath=null,normalConf={},envConf={};try{configPath=_path.default.join(_processEnv.PROGRAMPATH,"./config/index.ts"),_fs.default.accessSync(configPath,_fs.default.constants.R_OK)}catch(error){configPath=null}if(configPath)try{var conf=eval((0,_utils.tfc)(configPath)).default;normalConf=(0,_utils.isFunction)(conf)?conf(process):conf}catch(error){process.stdout.write(_chalk.default.red(error))}if(_processEnv.CUSTOMCONFIG){var customConfigPath=null;try{customConfigPath=_path.default.join(_processEnv.PROGRAMPATH,"./config/"+_processEnv.CUSTOMCONFIG+".ts"),_fs.default.accessSync(customConfigPath,_fs.default.constants.R_OK)}catch(error){customConfigPath=null}if(null!==customConfigPath)try{var conf=eval((0,_utils.tfc)(customConfigPath)).default;envConf=(0,_utils.isFunction)(conf)?conf(process):conf}catch(error){process.stdout.write(_chalk.default.red(error))}}customConf=(0,_webpackMerge.merge)(customConf,normalConf,envConf),customConf.minifier.js||(customConf.minifier.js={}),(null==customConf?void 0:null==(_customConf_minifier=customConf.minifier)?void 0:null==(_customConf_minifier_js=_customConf_minifier.js)?void 0:_customConf_minifier_js.type)||(customConf.minifier.js.type="swc"===customConf.compiler?"swc":"terser"),customConf.minifier.css||(customConf.minifier.css={}),(null==customConf?void 0:null==(_customConf_minifier1=customConf.minifier)?void 0:null==(_customConf_minifier_css=_customConf_minifier1.css)?void 0:_customConf_minifier_css.type)||(customConf.minifier.css.type="swc"===customConf.compiler?"swc":"cssnano"),!1===customConf.devtool&&(customConf.sourceMap=!1),!1===customConf.sourceMap&&(customConf.devtool=!1),customConf.fixBrowserRouter&&(customConf.htmlPluginOption.tags||(customConf.htmlPluginOption.tags=[]),customConf.htmlPluginOption.tags.push({textContent:"\n (function(l) {\n if (l.search[1] === '/' ) {\n var decoded = l.search.slice(1).split('&').map(function(s) { \n return s.replace(/~and~/g, '&')\n }).join('?');\n window.history.replaceState(null, null,\n l.pathname.slice(0, -1) + decoded + l.hash\n );\n }\n }(window.location))\n "}));var CONFIG=customConf,PUBLICPATH=CONFIG.publicPath||"/";global.NEKOCLICONFIG={CONFIG:CONFIG,log:log};
1
+ "use strict";function _export(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Object.defineProperty(exports,"__esModule",{value:!0}),_export(exports,{ENTRYPATH:function(){return ENTRYPATH},log:function(){return log},CONFIG:function(){return CONFIG},PUBLICPATH:function(){return PUBLICPATH}});var _fs=_interopRequireDefault(require("fs")),_path=_interopRequireDefault(require("path")),_readline=_interopRequireDefault(require("readline")),_chalk=_interopRequireDefault(require("chalk")),_webpackMerge=require("webpack-merge"),_processEnv=require("./process-env"),_utils=require("./utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var ENTRYPATH={mobile:"mobile",site:"site","back-stage":"back-stage","single-spa":"single-spa",library:"library","single-component":"single-component"},includeModule=[_processEnv.pkgName,"neko-ui","antd","@antv","katex","font-pingfang-sc","font-pingfang-tc","react-photo-view","react-markdown-editor-lite","schema-design"],defaultSplitChunk={chunks:"all",minSize:1024,minChunks:1};"single-component"===_processEnv.APPTYPE&&(defaultSplitChunk=!1);var defaultConfig={seo:!1,mode:"csr",compiler:"swc",emotion:{sourceMap:!0,autoLabel:"dev-only",labelFormat:"n-[local]"},bundleAnalyzer:{analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1},entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:""},env:{},routeBaseName:"/",publicPath:"/",designSize:"mobile"===_processEnv.APPTYPE?375:1680,fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:{},layoutSider:{},moduleRules:[],prefixJsLoader:[],cssModules:[],importOnDemand:{},proxy:[],cacheDirectory:_processEnv.PROGRAMPATH+"/node_modules/.temp_cache",devServer:{allowedHosts:[".baidu.com"],host:"localhost",port:3e3,https:!1,compress:!1},htmlPluginOption:{template:"./node_modules/"+_processEnv.pkgName+"/template/index.html",favicon:"./node_modules/"+_processEnv.pkgName+"/template/favicon.ico",tags:[]},assetHtml:[],routerMode:"browser",fixBrowserRouter:!1,plugins:[],splitChunk:defaultSplitChunk,runtimeChunk:"single-component"!==_processEnv.APPTYPE&&"single",moduleFederation:[],rulesInclude:{less:includeModule,css:includeModule,js:includeModule,media:includeModule,fonts:includeModule}},log=function(e){_readline.default.cursorTo(process.stdout,0),process.stdout.write(e)},customConf=defaultConfig,configPath=null,normalConf={},envConf={};try{configPath=_path.default.join(_processEnv.PROGRAMPATH,"./config/index.ts"),_fs.default.accessSync(configPath,_fs.default.constants.R_OK)}catch(error){configPath=null}if(configPath)try{var conf=eval((0,_utils.tfc)(configPath)).default;normalConf=(0,_utils.isFunction)(conf)?conf(process):conf}catch(error){process.stdout.write(_chalk.default.red(error))}if(_processEnv.CUSTOMCONFIG){var customConfigPath=null;try{customConfigPath=_path.default.join(_processEnv.PROGRAMPATH,"./config/"+_processEnv.CUSTOMCONFIG+".ts"),_fs.default.accessSync(customConfigPath,_fs.default.constants.R_OK)}catch(error){customConfigPath=null}if(null!==customConfigPath)try{var conf=eval((0,_utils.tfc)(customConfigPath)).default;envConf=(0,_utils.isFunction)(conf)?conf(process):conf}catch(error){process.stdout.write(_chalk.default.red(error))}}customConf=(0,_webpackMerge.merge)(customConf,normalConf,envConf),!1===customConf.devtool&&(customConf.sourceMap=!1),!1===customConf.sourceMap&&(customConf.devtool=!1),customConf.fixBrowserRouter&&(customConf.htmlPluginOption.tags||(customConf.htmlPluginOption.tags=[]),customConf.htmlPluginOption.tags.push({textContent:"\n (function(l) {\n if (l.search[1] === '/' ) {\n var decoded = l.search.slice(1).split('&').map(function(s) { \n return s.replace(/~and~/g, '&')\n }).join('?');\n window.history.replaceState(null, null,\n l.pathname.slice(0, -1) + decoded + l.hash\n );\n }\n }(window.location))\n "}));var CONFIG=customConf,PUBLICPATH=CONFIG.publicPath||"/";global.NEKOCLICONFIG={CONFIG:CONFIG,log:log};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(exports,{outputConfig:function(){return T},default:function(){return R}});var e,t,r=j(require("fs")),n=require("path"),a=j(require("add-asset-html-webpack-plugin")),s=j(require("html-webpack-plugin")),l=require("webpack"),o=j(require("webpackbar")),i=require("./common"),u=j(require("./done")),c=j(require("./envFlags")),p=j(require("./html-add-entry-attr")),d=j(require("./html-plugin-option")),m=require("./module-federation"),f=j(require("./module.config")),g=require("./process-env"),h=require("./seo"),y=require("./utils");function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function j(e){return e&&e.__esModule?e:{default:e}}function O(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}for(var A=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],v=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],C=r.default.readdirSync(g.PROGRAMPATH),w=!1,G=!1,N=0,I=C.length;N<I;N++)v.includes(C[N])&&(G=!0),A.includes(C[N])&&(w=!0);w||(w=g.hasEslintConfig),G||(G=g.hasStylelintConfig);var x=G?require("stylelint-webpack-plugin"):null,F=w?require("eslint-webpack-plugin"):null,E={"@":(0,y.resolveProgramPath)("src")};Object.assign(E,i.CONFIG.alias),"library"===g.APPTYPE&&Object.assign(E,((e={"@":(0,y.resolveProgramPath)("site"),"@pkg":(0,y.resolveProgramPath)("components")})[g.PACKAGENAME]=(0,y.resolveProgramPath)("components"),e));var q=i.CONFIG.assetHtml.map(function(e){return P({publicPath:""},e)}),T={path:(0,y.resolveProgramPath)("library"===g.APPTYPE?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:"js/[name].chunk.js",assetModuleFilename:"assets/[name].[hash][ext]",library:g.PACKAGENAME,libraryTarget:"window",globalObject:"window",chunkLoadingGlobal:"webpackJsonp_"+g.PACKAGENAME,pathinfo:!1,clean:!0,publicPath:i.PUBLICPATH},k=(0,n.join)(__dirname,"../lib/packages/"+i.ENTRYPATH[g.APPTYPE]+"/index.js");"single-component"===g.APPTYPE&&(Object.assign(E,((t={})[g.PACKAGENAME]=(0,y.resolveProgramPath)("umd"),t)),k=(0,y.resolveProgramPath)(g.DEV?"example/index.ts":"src/index.ts"),T.path=(0,y.resolveProgramPath)(g.DEV?"dist":"umd"),T.filename="index.js",T.library=g.PACKAGENAME,T.libraryTarget="umd",T.libraryExport="default");var M={main:k};i.CONFIG.entry&&("string"==typeof i.CONFIG.entry?M=i.CONFIG.entry:Object.keys(i.CONFIG.entry)&&Object.assign(M,i.CONFIG.entry)),i.CONFIG.output&&("string"==typeof i.CONFIG.output?T.path=i.CONFIG.output:Object.keys(i.CONFIG.output)&&Object.assign(T,i.CONFIG.output));var S=i.CONFIG.routeBaseName.split("/").filter(Boolean).length,_=Array(S).fill("..").join("/")+(S?"/":"")+"404.html",K=i.CONFIG.fixBrowserRouter||{},B=K.pathSegmentsToKeep,Y=void 0===B?S:B,D=K.path,R={entry:M,stats:"errors-only",infrastructureLogging:{level:"none"},target:"web",plugins:[new l.AutomaticPrefetchPlugin].concat(O(m.moduleFederation),[F&&new F({threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),x&&new x({fix:!0,threads:!0,extensions:["css","scss","sass","less","ts","tsx","js","jsx"],exclude:["node_modules/","es/","lib/","docs/","coverage/","dist/","__tests__/"]}),new s.default(d.default),i.CONFIG.fixBrowserRouter&&new s.default({filename:void 0===D?_:D,inject:!1,templateContent:function(){return"<html html><head><title>"+d.default.title+"</title><script>var pathSegmentsToKeep = "+(Y||S)+";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 a.default(q),"single-spa"===g.APPTYPE&&new p.default(function(e){return!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))}),new l.DefinePlugin(c.default),new l.WatchIgnorePlugin({paths:[/\.d\.ts$/]}),i.CONFIG.sourceMap&&new l.SourceMapDevToolPlugin(i.CONFIG.sourceMap),new o.default({name:"编译中",color:"#6f42c1"}),new u.default({done:function(){!g.DEV&&i.CONFIG.seo&&(0,h.seo)(),null==i.CONFIG.done||i.CONFIG.done()}})],O(i.CONFIG.plugins)).filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:E,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:f.default,externals:i.CONFIG.externals,output:T};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(exports,{outputConfig:function(){return T},default:function(){return R}});var e,t,r=j(require("fs")),n=require("path"),a=j(require("add-asset-html-webpack-plugin")),s=j(require("html-webpack-plugin")),l=require("webpack"),o=j(require("webpackbar")),i=require("./common"),u=j(require("./done")),c=j(require("./envFlags")),p=j(require("./html-add-entry-attr")),d=j(require("./html-plugin-option")),m=require("./module-federation"),f=j(require("./module.config")),g=require("./process-env"),h=require("./seo"),y=require("./utils");function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function j(e){return e&&e.__esModule?e:{default:e}}function O(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}for(var A=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],v=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],C=r.default.readdirSync(g.PROGRAMPATH),w=!1,G=!1,N=0,I=C.length;N<I;N++)v.includes(C[N])&&(G=!0),A.includes(C[N])&&(w=!0);w||(w=g.hasEslintConfig),G||(G=g.hasStylelintConfig);var x=G?require("stylelint-webpack-plugin"):null,F=w?require("eslint-webpack-plugin"):null,E={"@":(0,y.resolveProgramPath)("src")};Object.assign(E,i.CONFIG.alias),"library"===g.APPTYPE&&Object.assign(E,((e={"@":(0,y.resolveProgramPath)("site"),"@pkg":(0,y.resolveProgramPath)("components")})[g.PACKAGENAME]=(0,y.resolveProgramPath)("components"),e));var q=i.CONFIG.assetHtml.map(function(e){return P({publicPath:""},e)}),T={path:(0,y.resolveProgramPath)("library"===g.APPTYPE?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:"js/[name].chunk.js",assetModuleFilename:"assets/[name].[hash][ext]",library:g.PACKAGENAME,libraryTarget:"window",globalObject:"window",chunkLoadingGlobal:"webpackJsonp_"+g.PACKAGENAME,pathinfo:!1,clean:!0,publicPath:i.PUBLICPATH},k=(0,n.join)(__dirname,"../lib/packages/"+i.ENTRYPATH[g.APPTYPE]+"/index.js");"single-component"===g.APPTYPE&&(Object.assign(E,((t={})[g.PACKAGENAME]=(0,y.resolveProgramPath)("umd"),t)),k=(0,y.resolveProgramPath)(g.DEV?"example/index.ts":"src/index.ts"),T.path=(0,y.resolveProgramPath)(g.DEV?"dist":"umd"),T.filename="index.js",T.library=g.PACKAGENAME,T.libraryTarget="umd",T.libraryExport="default");var M={main:k};i.CONFIG.entry&&("string"==typeof i.CONFIG.entry?M=i.CONFIG.entry:Object.keys(i.CONFIG.entry)&&Object.assign(M,i.CONFIG.entry)),i.CONFIG.output&&("string"==typeof i.CONFIG.output?T.path=i.CONFIG.output:Object.keys(i.CONFIG.output)&&Object.assign(T,i.CONFIG.output));var S=i.CONFIG.routeBaseName.split("/").filter(Boolean).length,K=Array(S).fill("..").join("/")+(S?"/":"")+"404.html",_=i.CONFIG.fixBrowserRouter||{},B=_.pathSegmentsToKeep,Y=void 0===B?S:B,D=_.path,R={entry:M,stats:"errors-only",infrastructureLogging:{level:"none"},target:"web",plugins:[new l.AutomaticPrefetchPlugin].concat(O(m.moduleFederation),[F&&new F({threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),x&&new x({fix:!0,threads:!0,extensions:["css","scss","sass","less","ts","tsx","js","jsx"],exclude:["node_modules/","es/","lib/","docs/","coverage/","dist/"]}),new s.default(d.default),i.CONFIG.fixBrowserRouter&&new s.default({filename:void 0===D?K:D,inject:!1,templateContent:function(){return"<html html><head><title>"+d.default.title+"</title><script>var pathSegmentsToKeep = "+(Y||S)+";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 a.default(q),"single-spa"===g.APPTYPE&&new p.default(function(e){return!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))}),new l.DefinePlugin(c.default),new l.WatchIgnorePlugin({paths:[/\.d\.ts$/]}),i.CONFIG.sourceMap&&new l.SourceMapDevToolPlugin(i.CONFIG.sourceMap),new o.default({name:"编译中",color:"#6f42c1"}),new u.default({done:function(){!g.DEV&&i.CONFIG.seo&&(0,h.seo)(),null==i.CONFIG.done||i.CONFIG.done()}})],O(i.CONFIG.plugins)).filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:E,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:f.default,externals:i.CONFIG.externals,output:T};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return b}});var e,n,r,i,t=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=y(n);if(r&&r.has(e))return r.get(e);var i={},t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=t?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(i,u,o):i[u]=e[u]}return i.default=e,r&&r.set(e,i),i}(require("css-minimizer-webpack-plugin")),u=d(require("mini-css-extract-plugin")),o=d(require("terser-webpack-plugin")),l=require("webpack"),a=require("webpack-bundle-analyzer"),c=require("webpack-merge"),s=require("./common"),p=require("./minify"),m=d(require("./webpack.common"));function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function d(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,r=new WeakMap;return(y=function(e){return e?r:n})(e)}var O={swc:t.swcMinify,cssnano:t.cssnanoMinify},C={splitChunks:s.CONFIG.splitChunk,runtimeChunk:s.CONFIG.runtimeChunk,chunkIds:"named",moduleIds:"named",removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,minimize:!0,minimizer:[new o.default((0,p.getMinifyOption)((null==(e=s.CONFIG.minifier.js)?void 0:e.type)||"swc",null==(n=s.CONFIG.minifier.js)?void 0:n.options)),new t.default({minify:O[(null==(r=s.CONFIG.minifier.css)?void 0:r.type)||"swc"],minimizerOptions:f({preset:["default",{discardComments:{removeAll:!0}}]},null==(i=s.CONFIG.minifier.css)?void 0:i.options)})]},v=!1;s.CONFIG.cacheDirectory&&(v={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:s.CONFIG.cacheDirectory});var b=(0,c.merge)(m.default,{devtool:!1===s.CONFIG.devtool||s.CONFIG.devtool?s.CONFIG.devtool:"cheap-module-source-map",mode:"production",cache:v,optimization:C,plugins:[new u.default({filename:"style/[name].bundle.css",chunkFilename:"style/[name].chunk.css",experimentalUseImportModule:!0}),s.CONFIG.bundleAnalyzer&&new a.BundleAnalyzerPlugin(s.CONFIG.bundleAnalyzer),s.CONFIG.splitChunk&&new l.optimize.MinChunkSizePlugin({minChunkSize:1e4})].filter(Boolean)});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return b}});var e,n,i,r,t=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=d(n);if(i&&i.has(e))return i.get(e);var r={},t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var o=t?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(r,u,o):r[u]=e[u]}return r.default=e,i&&i.set(e,r),r}(require("css-minimizer-webpack-plugin")),u=f(require("mini-css-extract-plugin")),o=f(require("terser-webpack-plugin")),l=require("webpack"),c=require("webpack-bundle-analyzer"),a=require("webpack-merge"),s=require("./common"),p=require("./minify"),m=f(require("./webpack.common"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,i=new WeakMap;return(d=function(e){return e?i:n})(e)}var y="swc"===s.CONFIG.compiler?"swc":"terser",O="swc"===s.CONFIG.compiler?"swc":"cssnano",C={swc:t.swcMinify,cssnano:t.cssnanoMinify},w={splitChunks:s.CONFIG.splitChunk,runtimeChunk:s.CONFIG.runtimeChunk,chunkIds:"named",moduleIds:"named",removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,minimize:!0,minimizer:[new o.default((0,p.getMinifyOption)((null==(e=s.CONFIG.minifier.js)?void 0:e.type)||y,null==(n=s.CONFIG.minifier.js)?void 0:n.options)),new t.default({minify:C[(null==(i=s.CONFIG.minifier.css)?void 0:i.type)||O],minimizerOptions:null==(r=s.CONFIG.minifier.css)?void 0:r.options})]},k=!1;s.CONFIG.cacheDirectory&&(k={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:s.CONFIG.cacheDirectory});var b=(0,a.merge)(m.default,{devtool:!1===s.CONFIG.devtool||s.CONFIG.devtool?s.CONFIG.devtool:"cheap-module-source-map",mode:"production",cache:k,optimization:w,plugins:[new u.default({filename:"style/[name].bundle.css",chunkFilename:"style/[name].chunk.css",experimentalUseImportModule:!0}),s.CONFIG.bundleAnalyzer&&new c.BundleAnalyzerPlugin(s.CONFIG.bundleAnalyzer),s.CONFIG.splitChunk&&new l.optimize.MinChunkSizePlugin({minChunkSize:1e4})].filter(Boolean)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "2.0.53-beta.8",
3
+ "version": "2.0.53-beta.9",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -65,17 +65,17 @@
65
65
  "devDependencies": {
66
66
  "@swc/cli": "0.1.62",
67
67
  "@types/mini-css-extract-plugin": "^2.5.1",
68
- "@types/react": "^18.0.28",
68
+ "@types/react": "^18.0.35",
69
69
  "@types/react-dom": "^18.0.11",
70
70
  "@types/react-router-dom": "^5.3.3",
71
- "@types/shelljs": "^0.8.11",
71
+ "@types/shelljs": "^0.8.12",
72
72
  "@types/webpack-bundle-analyzer": "^4.6.0",
73
73
  "@types/webpack-env": "^1.18.0",
74
- "antd": "5.3.1",
75
- "eslint-config-neko": "^1.0.20",
74
+ "antd": "5.4.2",
75
+ "eslint-config-neko": "^1.0.22",
76
76
  "react": "^18.2.0",
77
77
  "shelljs": "^0.8.5",
78
- "stylelint-config-moneko": "^1.0.9"
78
+ "stylelint-config-moneko": "^1.0.13"
79
79
  },
80
80
  "files": [
81
81
  "lib",
@@ -96,7 +96,7 @@ export declare type ConfigType<T = 'tsc'> = {
96
96
  };
97
97
  css?: {
98
98
  /**
99
- * @default 'lightningCss'
99
+ * @default 'swc'
100
100
  */
101
101
  type?: CssMinify;
102
102
  options?: CssNanoOptionsExtended;