@moneko/core 3.15.6-beta.7 → 3.15.6-beta.8
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/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
|
|
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};
|