@moneko/core 3.15.6-beta.1 → 3.15.6-beta.2

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 CHANGED
@@ -1 +1 @@
1
- import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as s}from"./paths.mjs";import r from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as l,isDev as a,isLibrary as p}from"./process-env.mjs";import m from"./rule.mjs";import{node_modules as c,resolveProgram as u}from"./utils/index.mjs";export const outputConfig={path:u(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${a?"name":"chunkhash"}].js`,assetModuleFilename:e=>{let t=e.filename;return t?.endsWith("?url")&&m.worker_file.test(t.replace("?url",""))?"worker/[name][ext]":"assets/[name][hash][ext]"},library:{name:i,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:a,clean:!0,publicPath:t,asyncChunks:!0,charset:!0};let f={main:[e.polyfill&&`${o.corePath}/polyfills/replace-children.js`,c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?f={main:[e.entry]}:Object.keys(e.entry)&&(f=Object.assign(f,e.entry))),"string"==typeof f.main&&(f.main=[f.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let d=!1;e.cacheDirectory&&(d={type:"filesystem",store:"pack",allowCollectingMemory:!0,cacheDirectory:e.cacheDirectory,memoryCacheUnaffected:!0,name:[s,process.env.NODE_ENV].filter(Boolean).join("-"),version:l});let y=Object.assign({original:e.alias["@"],override:s&&u(s)},e.overrideResolve);export const commonConfig={devtool:e.devtool,entry:f,mode:a?"development":"production",stats:"errors-only",cache:d,infrastructureLogging:{level:"error"},target:"web",externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:a&&{imports:!1,entries:!1},buildHttp:e.buildHttp,backCompat:!0,futureDefaults:!1,css:!1,outputModule:!1},resolve:{extensions:["...",".jsx",".ts",".tsx"],alias:e.alias,modules:[o.nodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[e.overrideResolve&&new r(y),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},externals:e.externals,output:outputConfig};
1
+ import{CONFIG as e,PUBLICPATH as t}from"./config.mjs";import o,{CUSTOMCONFIG as s}from"./paths.mjs";import r from"./plugin/override-resolve.mjs";import n from"./plugins.config.mjs";import{PACKAGENAME as i,PACKAGEVERSION as l,isDev as a,isLibrary as p}from"./process-env.mjs";import m from"./rule.mjs";import{node_modules as c,resolveProgram as u}from"./utils/index.mjs";export const outputConfig={path:u(p?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${a?"name":"chunkhash"}].js`,assetModuleFilename:e=>{let t=e.filename;return t?.endsWith("?url")&&m.worker_file.test(t.replace("?url",""))?"worker/[name][ext]":"assets/[name][hash][ext]"},library:{name:i,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:a,clean:!0,publicPath:t,asyncChunks:!0,charset:!0};let f={main:[e.polyfill&&`${o.corePath}/polyfills/replace-children.js`,c("@app/entry")].filter(Boolean)};e.entry&&("string"==typeof e.entry?f={main:[e.entry]}:Object.keys(e.entry)&&(f=Object.assign(f,e.entry))),"string"==typeof f.main&&(f.main=[f.main]),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let d=!1;e.cacheDirectory&&(d={type:"filesystem",store:"pack",allowCollectingMemory:!0,cacheDirectory:e.cacheDirectory,memoryCacheUnaffected:!0,name:[s,process.env.NODE_ENV].filter(Boolean).join("-"),version:l});let y=Object.assign({original:e.alias["@"],override:s&&u(s)},e.overrideResolve);export const commonConfig={devtool:e.devtool,entry:f,mode:a?"development":"production",stats:"errors-only",cache:d,infrastructureLogging:{level:"error"},target:"web",externalsPresets:e.externalsPresets,plugins:n,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:a&&{imports:!1,entries:!1},buildHttp:e.buildHttp,backCompat:!0,futureDefaults:!1,css:!1,outputModule:!1},resolve:{symlinks:!0,extensions:["...",".jsx",".ts",".tsx"],alias:e.alias,modules:[o.nodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[e.overrideResolve&&new r(y),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},externals:e.externals,output:outputConfig};
@@ -1 +1 @@
1
- import{resolve as o}from"path";import e from"./resolver-sync.mjs";import t from"../paths.mjs";import{resolve as r}from"import-meta-resolve";export function toUpperCaseString(o){return o?.replaceAll(/\b\w/g,o=>o.toUpperCase()).replaceAll(/\./g," ")}export function resolveProgram(e){return o(t.programPath,`./${e}`)}export function node_modules(e){try{return console.log({path:o(t.nodeModules,`./${e}`),resolve:r(e,import.meta.url)}),r(e,import.meta.url)}catch(r){return console.log({path:o(t.nodeModules,`./${e}`)}),o(t.nodeModules,`./${e}`)}}export const realResolve=o=>e.resolveSync({},t.programPath,o)||o;export function isObject(o){let e=typeof o;return null!==o&&("object"===e||"function"===e)}export function isFunction(o){if(!isObject(o))return!1;let e=Object.prototype.toString.call(o);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object Proxy]"===e}export function empty(){}
1
+ import{resolve as t}from"path";import o from"./resolver-sync.mjs";import e from"../paths.mjs";import{resolve as r}from"import-meta-resolve";export function toUpperCaseString(t){return t?.replaceAll(/\b\w/g,t=>t.toUpperCase()).replaceAll(/\./g," ")}export function resolveProgram(o){return t(e.programPath,`./${o}`)}export function node_modules(o){try{return r(o,import.meta.url)}catch(r){return console.log({path:t(e.nodeModules,`./${o}`)}),t(e.nodeModules,`./${o}`)}}export const realResolve=t=>o.resolveSync({},e.programPath,t)||t;export function isObject(t){let o=typeof t;return null!==t&&("object"===o||"function"===o)}export function isFunction(t){if(!isObject(t))return!1;let o=Object.prototype.toString.call(t);return"[object Function]"===o||"[object AsyncFunction]"===o||"[object GeneratorFunction]"===o||"[object Proxy]"===o}export function empty(){}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.15.6-beta.1",
3
+ "version": "3.15.6-beta.2",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",