@moneko/core 3.15.6-beta.8 → 3.15.6-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/lib/common.mjs +1 -1
- package/lib/paths.d.mts +1 -0
- package/lib/paths.mjs +1 -1
- package/package.json +1 -1
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
|
|
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 u,resolveProgram as c}from"./utils/index.mjs";export const outputConfig={path:c(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`,u("@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&&c(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,o.pnpmNodeModules],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};
|
package/lib/paths.d.mts
CHANGED
package/lib/paths.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"url";import{dirname as
|
|
1
|
+
import e from"url";import{dirname as o,resolve as t}from"path";let a=JSON.parse(process.env.npm_config_argv||'{"original":[]}').original;export const __filename=e.fileURLToPath(import.meta.url);export const __dirname=o(__filename);export const yarnArgv={};for(let e=0,o=a.length;e<o;e++){let o=a[e].split("=");Object.assign(yarnArgv,{[o[0]]:o[1]||!0})}export const CUSTOMCONFIG=process.env.npm_config_config||yarnArgv.config;let c=process.cwd(),n=t(c,"./node_modules"),r={__dirname,__filename,nodeModules:n,pnpmNodeModules:t(n,"./.pnpm/node_modules"),corePath:e.fileURLToPath(new URL(".",import.meta.url)),programPath:c,webpackCachePath:t(n,"./.temp_cache"),lineCachePath:t(n,"./.cache"),cachePath:t(n,"./.cache/.mo"),httpCachePath:t(n,"./.cache/http"),swcCachePath:t(n,"./.cache/.swc"),configPath:t(c,"./config/index.ts"),customConfigPath:t(c,`./config/${CUSTOMCONFIG}.ts`),coveragePath:t(c,"./coverage/clover.xml"),pagesPath:t(c,"./src/pages"),componentsPath:t(c,"./components"),mockPath:t(c,"./mock"),vfsDtsPath:t(n,"./@app")};export const routeDir="library"===process.env.APPTYPE?r.componentsPath:r.pagesPath;export default r;
|