@moneko/core 3.0.0-beta.126 → 3.0.0-beta.128
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/module.config.js +1 -1
- package/lib/webpack.common.d.ts +1 -0
- package/lib/webpack.common.js +1 -1
- package/package.json +1 -3
package/lib/module.config.js
CHANGED
|
@@ -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{DEV as n,FRAMEWORK as i,__dirname as c,isMicro 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={loader:e(c,"./loader/css-unicode.cjs")},x=m?r:"../",g={loader:s.loader,options:{publicPath:"/"!==x?x:"../"}},j=l("@moneko/postcss")&&{loader:"postcss-loader",options:{postcssOptions:await import("@moneko/postcss")}};n&&(g="style-loader");let $=[...t.cssModules,`@moneko/${i}`,"neko-ui"].map(u),v=[...["src/styles/variables
|
|
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{DEV as n,FRAMEWORK as i,__dirname as c,isMicro 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={loader:e(c,"./loader/css-unicode.cjs")},x=m?r:"../",g={loader:s.loader,options:{publicPath:"/"!==x?x:"../"}},j=l("@moneko/postcss")&&{loader:"postcss-loader",options:{postcssOptions:await import("@moneko/postcss")}};n&&(g="style-loader");let $=[...t.cssModules,`@moneko/${i}`,"neko-ui"].map(u),v=[...["src/styles/variables.less","src/styles/mixins.less","site/styles/variables.less","site/styles/mixins.less"].map(f)],b=["components","example","mock","site","src","server"].map(f),w=[g,{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}},j,y,{loader:"less-loader",options:{sourceMap:!!t.sourceMap,lessOptions:{modifyVars:a,javascriptEnabled:!0}}},{loader:"style-resources-loader",options:{patterns:v}}].filter(Boolean),h={loader:"tsc"===t.compiler?"ts-loader":"swc-loader",options:"tsc"===t.compiler?d:p(n)},k={rules:[{test:/\.mdx?$/,include:[f("components")],exclude:[/(.+)\/examples\/(.+).mdx?$/i],enforce:"pre",use:[{loader:e(c,"./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:b.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:b.concat(t.rulesInclude?.fonts?.map(u)||[])},{test:/\.less$/,use:w,include:b.concat(t.rulesInclude?.less?.map(u)||[])},{test:/\.css$/,use:[g,"css-loader",j,y].filter(Boolean),include:b.concat(t.rulesInclude?.css?.map(u)||[])},{test:/\.(cj|mj|t|j)s(|x)$/,use:[...t.prefixJsLoader,h].filter(Boolean),include:b.concat(t.rulesInclude?.js?.map(u)||[])},{test:/\.mdx?$/,use:[...t.prefixJsLoader,h,{loader:"@mdx-js/loader",options:t.mdx}].filter(Boolean),include:b,exclude:[/(.+)\/examples\/(.+).mdx?$/i]},{type:"asset/source",include:[/(.+)\/examples\/(.+).*?$/i]}]},...t.moduleRules]};export default k;
|
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 o from"webpack";import l from"webpackbar";import"./cleanup.js";import{CONFIG as n,PUBLICPATH as r}from"./common.js";import i from"./define.js";import a from"./done.js";import
|
|
1
|
+
import e from"fs";import t from"add-asset-html-webpack-plugin";import s from"html-webpack-plugin";import o from"webpack";import l from"webpackbar";import"./cleanup.js";import{CONFIG as n,PUBLICPATH as r}from"./common.js";import i from"./define.js";import a from"./done.js";import m from"./html-add-entry-attr.js";import p from"./html-plugin-option.js";import"./memory-declaration.js";import{moduleFederation as c}from"./module-federation.js";import u from"./module.config.js";import{CUSTOMCONFIG as f,DEV as d,PACKAGENAME as h,PROGRAMPATH as j,hasEslintConfig as y,hasStylelintConfig as g,isLibrary as w,isMicro as b}from"./process-env.js";import{seo as x}from"./seo.js";import{resolveNodeModulesPath as k,resolveProgramPath as v}from"./utils.js";import C from"./virtual-module-plugin.js";import $ from"./virtual-modules.js";let{AutomaticPrefetchPlugin:O,DefinePlugin:B,SourceMapDevToolPlugin:P,WatchIgnorePlugin:A}=o,M=[".eslintrc.js",".eslintrc.json",".eslintrc.yaml",".eslintrc.json"],S=[".stylelintrc",".stylelintrc.json",".stylelintrc.yaml",".stylelintrc.yml",".stylelintrc.js","stylelint.config.js","stylelint.config.cjs"],T=e.readdirSync(j),D=!1,K=!1;for(let e=0,t=T.length;e<t;e++)S.includes(T[e])&&(K=!0),M.includes(T[e])&&(D=!0);D||(D=y),K||(K=g);let L=K?(await import("stylelint-webpack-plugin")).default:null,F=D?(await import("eslint-webpack-plugin")).default:null,R=n.assetHtml.map(e=>({publicPath:"",...e}));export const outputConfig={path:v(w?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:"js/[chunkhash].js",assetModuleFilename:"assets/[hash][ext][query]",library:{name:h,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${h}`,pathinfo:d,clean:!0,publicPath:r,asyncChunks:!0};let W={main:k("@app/entry")};n.entry&&("string"==typeof n.entry?W=n.entry:Object.keys(n.entry)&&Object.assign(W,n.entry)),n.output&&("string"==typeof n.output?outputConfig.path=n.output:Object.keys(n.output)&&Object.assign(outputConfig,n.output));let _=n.routeBaseName.split("/").filter(Boolean).length,q=`${Array(_).fill("..").join("/")+(_?"/":"")}404.html`,{pathSegmentsToKeep:G=_,path:H=q}=n.fixBrowserRouter||{},J=!1;n.cacheDirectory&&(J={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:n.cacheDirectory,memoryCacheUnaffected:!0,name:`${f||"default"}-${d?"development":"production"}`});export const clientConfig={entry:W,stats:"errors-only",cache:J,infrastructureLogging:{level:"none"},target:"web",externalsPresets:n.externalsPresets,plugins:[new O,...c,F&&new F({fix:!0,threads:!0,extensions:["js","md","mdx","cjs","ejs","mjs","jsx","ts","tsx","json","html","coffee","vue"]}),L&&new L({fix:!0,threads:!0,extensions:["css","scss","sass","less","ts","tsx","js","jsx"],exclude:["node_modules/","es/","lib/","docs/","coverage/","dist/"]}),n.htmlPluginOption&&new s(p),n.fixBrowserRouter&&new s({filename:H,inject:!1,templateContent:()=>`<html html><head><title>${p.title}</title><script>var pathSegmentsToKeep = ${G||_};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(R),b&&new m(e=>!!(e.match(/main\.(.*)\.bundle.js$/)||e.match("main.bundle.js"))),new B(i),new A({paths:[/\.d\.ts$/]}),n.sourceMap&&new P(n.sourceMap),n.bar&&new l(n.bar),new a({done:()=>{!d&&n.seo&&x(),n.done?.(),d||setTimeout(()=>{process.exit(0)},2e3)}}),new C($),...n.plugins].filter(Boolean),experiments:{topLevelAwait:!0,syncWebAssembly:!0,asyncWebAssembly:!0},resolve:{extensions:[".tsx",".ts",".js",".jsx"],alias:n.alias,fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:u,externals:n.externals,output:outputConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.128",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"less-loader": "11.1.3",
|
|
30
30
|
"mini-css-extract-plugin": "2.7.6",
|
|
31
31
|
"mini-svg-data-uri": "1.4.4",
|
|
32
|
-
"path-to-regexp": "6.2.1",
|
|
33
32
|
"style-loader": "3.3.3",
|
|
34
33
|
"style-resources-loader": "1.5.0",
|
|
35
34
|
"swc-loader": "0.2.3",
|
|
@@ -47,7 +46,6 @@
|
|
|
47
46
|
"xml2js": "0.6.2"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@moneko/mock": "1.0.10",
|
|
51
49
|
"@swc/cli": "0.1.62",
|
|
52
50
|
"@types/js-yaml": "4.0.5",
|
|
53
51
|
"@types/mini-css-extract-plugin": "2.5.1",
|