@moneko/core 3.17.28-beta.6 → 3.17.28
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.mjs +1 -1
- package/lib/module.config.mjs +1 -1
- package/package.json +3 -3
package/lib/common.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as s}from"./paths.mjs";import a from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as r,isDev as l,isLibrary as p}from"./process-env.mjs";import{isObject as m,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{join as h,resolve as d,extname as f}from"path";import{exampleModuleName as g}from"./vm/example.mjs";export const outputConfig={path:u(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${l?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=f(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:i,type:"this"},globalObject:"this",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:l,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let y={main:[e.polyfill&&h(o.corePath,"./polyfills/replace-children.mjs"),c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?y={main:[e.entry]}:Object.keys(e.entry)&&(y=Object.assign(y,e.entry))),"string"==typeof y.main&&(y.main=[y.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let b=!1;m(e.cache)&&(b=Object.assign({type:"filesystem",store:"pack",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,idleTimeoutForInitialStore:0,cacheUnaffected:!0,name:[s,process.env.NODE_ENV].filter(Boolean).join("-"),version:r,profile:!0},e.cache));let j=Object.assign({original:e.alias["@"],override:s&&u(s)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:y,mode:l?"development":"production",stats:"errors-only",cache:b,infrastructureLogging:{level:"error"},performance:{maxAssetSize:307200,maxEntrypointSize:512e3,assetFilter:e=>e.endsWith(".js")},externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:l&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(c(g))||t.startsWith(c("@app/comment"))||t.startsWith(o.pagesPath)||t.startsWith(o.componentsPath)))}},buildHttp:m(e.buildHttp)?{allowedUris:[],lockfileLocation:d(o.httpCachePath,"http.lock"),cacheLocation:d(o.httpCachePath,"data"),upgrade:!0,...e.buildHttp}:e.buildHttp,backCompat:!0,futureDefaults:!
|
|
1
|
+
import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as s}from"./paths.mjs";import a from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as r,isDev as l,isLibrary as p}from"./process-env.mjs";import{isObject as m,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{join as h,resolve as d,extname as f}from"path";import{exampleModuleName as g}from"./vm/example.mjs";export const outputConfig={path:u(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${l?"name":"contenthash"}].js`,assetModuleFilename:e=>{let t=f(e.filename||"").substring(1);return`assets/${t?`${t}/`:""}[name]${"js"===t?"":"[hash]"}[ext]`},library:{name:i,type:"this"},globalObject:"this",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:l,clean:!0,publicPath:t,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],hotUpdateChunkFilename:"[id].[fullhash].hot.js",hotUpdateMainFilename:"[runtime].[fullhash].hot.json"};let y={main:[e.polyfill&&h(o.corePath,"./polyfills/replace-children.mjs"),c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?y={main:[e.entry]}:Object.keys(e.entry)&&(y=Object.assign(y,e.entry))),"string"==typeof y.main&&(y.main=[y.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let b=!1;m(e.cache)&&(b=Object.assign({type:"filesystem",store:"pack",allowCollectingMemory:!0,cacheDirectory:o.webpackCachePath,memoryCacheUnaffected:!0,idleTimeoutForInitialStore:0,cacheUnaffected:!0,name:[s,process.env.NODE_ENV].filter(Boolean).join("-"),version:r,profile:!0},e.cache));let j=Object.assign({original:e.alias["@"],override:s&&u(s)},e.overrideResolve);export const commonConfig={name:"client",target:"web",devtool:e.devtool,entry:y,mode:l?"development":"production",stats:"errors-only",cache:b,infrastructureLogging:{level:"error"},performance:{maxAssetSize:307200,maxEntrypointSize:512e3,assetFilter:e=>e.endsWith(".js")},externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:l&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(c(g))||t.startsWith(c("@app/comment"))||t.startsWith(o.pagesPath)||t.startsWith(o.componentsPath)))}},buildHttp:m(e.buildHttp)?{allowedUris:[],lockfileLocation:d(o.httpCachePath,"http.lock"),cacheLocation:d(o.httpCachePath,"data"),upgrade:!0,...e.buildHttp}:e.buildHttp,backCompat:!0,futureDefaults:!1,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 a(j),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1,url:!1}},externals:e.externals,output:outputConfig};
|
package/lib/module.config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e;import{CONFIG as s}from"./config.mjs";import o from"./options/modify-vars.mjs";import t from"./options/swcrc.mjs";import r,{CUSTOMCONFIG as
|
|
1
|
+
let e;import{CONFIG as s}from"./config.mjs";import o from"./options/modify-vars.mjs";import t from"./options/swcrc.mjs";import r,{CUSTOMCONFIG as a}from"./paths.mjs";import{getLightningCssTargets as n}from"./polyfills/targets.mjs";import{FRAMEWORK as i,isDev as m,isLibrary as l}from"./process-env.mjs";import d from"./rule.mjs";import c from"./utils/has-pkg.mjs";import{node_modules as p,resolveProgram as u}from"./utils/index.mjs";import f from"./utils/svg-to-data-uri.mjs";import{comment as y,getCommentPath as j}from"./vm/docs.mjs";import g from"./vm/generate-doc.mjs";import v from"./options/css-extract.mjs";import{saveFileSync as h}from"@moneko/utils";import x from"./utils/reactive-object.mjs";import w from"./options/reslove.mjs";let M={loader:`${r.corePath}/loader/lightningcss.cjs`,options:{sourceMap:!!s.sourceMap,analyzeDependencies:!1,targets:n(),drafts:{nesting:!0,customMedia:!0},errorRecovery:!1,unusedSymbols:[],rem:!!s.rem}},P={loader:w.lessLoader,options:{sourceMap:!!s.sourceMap,lessOptions:{modifyVars:o,javascriptEnabled:!0}}},_=[...s.cssModules,`@moneko/${i}`,"neko-ui"].map(p),L=["components","example","mock","site","src","server"].map(u);function $(e){return[...L,...s.rulesInclude?.[e]?.map(p)||[]]}a&&L.push(u(a)),s.overrideResolve&&s.overrideResolve.override&&L.push(s.overrideResolve.override);let k=$("css"),O=$("js"),b=$("media"),I=$("wasm"),R=$("font");w.sassLoader&&(e={loader:w.sassLoader,options:{implementation:await import("sass"),sassOptions:{}}});let B=l&&m&&{test:d.tsdoc,include:s.alias["@pkg"],exclude:[d.node_modules,d.__tests__],enforce:"pre",loader:`${r.corePath}/loader/ts-doc.cjs`,options:{comment:y,generateDoc:g,getCommentPath:j}},C=[{resourceQuery:/raw/i,type:"asset/source"},{resourceQuery:/url/i,type:"asset/resource",generator:{filename:e=>{let s=e.filename;return s&&s.endsWith("wasm?url")?"wasm/[name][ext]":"assets/[name][ext]"}}},{test:d.wasm,type:"webassembly/async",include:I},{test:d.txt,type:"asset/source"},{test:d.ico,type:"asset/inline",include:b},{test:d.svg,type:"asset/inline",generator:{dataUrl:e=>f(e.toString())},include:b},{test:d.image,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/images/[name][ext]"},include:b},{test:d.video,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/video/[name][ext]"},include:b},{test:d.font,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/fonts/[name][ext]"},include:R}],D=s.prefixJsLoader.filter(Boolean)||[];m?c("solid-refresh")&&"solid"===i&&D.unshift(`${r.corePath}/loader/solid-refresh.cjs`):c("@moneko/css")&&D.unshift(`${r.corePath}/loader/css-in-js-minify.cjs`);let S=new x({});function z(e){S.setData(`${e.resourcePath}.d.ts`,e.exports.map(({name:e,value:s})=>`export const ${e}: '${s}';`).join("\n")+"\n")}S.on("change",(e,s)=>{h(e,s)});export default(o=>{let a={loader:w.swcLoader,options:t(o)},n={loader:w.cssLoader,options:{modules:{auto:e=>{if(e){for(let s=0,o=_.length;s<o;s++)if(e.includes(_[s]))return d.css_module.test(e)}return d.node_modules_css_module.test(e)},localIdentName:"[path][name]_[local]",exportLocalsConvention:"dashesOnly",exportOnlyLocals:o,getJSON:s.cssModuleDefinition?z:void 0},importLoaders:2}};return{parser:{javascript:{commonjsMagicComments:!0,dynamicImportMode:"lazy",dynamicImportPrefetch:!1,dynamicImportPreload:!1,importMeta:!0,importMetaContext:!0}},noParse:s.noParse,rules:[!1!==s.htmlPluginOption&&B,{oneOf:[...C,{test:d.js,use:[...D,a],include:O},{test:d.css,use:[v,w.cssLoader,M],include:k},e&&{test:d.scss,use:[v,n,M,e],include:k},{test:d.less,use:[v,n,M,P],include:k},{test:d.markdown,use:[...D,{loader:`${r.corePath}/loader/mdx.cjs`,options:s.mdx}],exclude:[d.node_modules]}].filter(Boolean)},...s.moduleRules].filter(Boolean)}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.17.28
|
|
3
|
+
"version": "3.17.28",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@babel/core": "7.24.7",
|
|
15
|
-
"@moneko/mdx": "0.1.
|
|
15
|
+
"@moneko/mdx": "0.1.35",
|
|
16
16
|
"@moneko/transform-imports": "0.5.1",
|
|
17
|
-
"@moneko/utils": "0.1.
|
|
17
|
+
"@moneko/utils": "0.1.3",
|
|
18
18
|
"@swc/core": "1.5.29",
|
|
19
19
|
"@typescript/vfs": "1.5.3",
|
|
20
20
|
"browserslist": "4.23.1",
|