@moneko/core 3.56.9-beta.1 → 3.56.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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{extname as e,join as t,resolve as o}from"node:path";import s,{config_files as a,CUSTOMCONFIG as n,TMP_DIR as i}from"./commom/paths.mjs";import{OverrideResolverPlugin as r}from"./plugin/override-resolve.mjs";import{isObject as l,node_modules as m,resolveProgram as c}from"./utils/index.mjs";import{exampleModuleName as p}from"./vm/example.mjs";import u from"./vm/info.mjs";import{CONFIG as h}from"./config.mjs";import d from"./plugins.config.mjs";import{isCI as f,isDev as g,isLibrary as b,NODE_ENV as y,packageJson as j}from"./process-env.mjs";export const outputConfig={path:c(b?"docs":"dist"),filename:"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[hash][ext]`},library:{name:`${u.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${j.name}`,pathinfo:g,clean:!g,publicPath:h.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${u.projectName}`};let v={main:[m("@app/entry")]},P=[t(s.corePath,"./polyfills/public-path.mjs")];if(
|
|
1
|
+
import{extname as e,join as t,resolve as o}from"node:path";import s,{config_files as a,CUSTOMCONFIG as n,TMP_DIR as i}from"./commom/paths.mjs";import{OverrideResolverPlugin as r}from"./plugin/override-resolve.mjs";import{isObject as l,node_modules as m,resolveProgram as c}from"./utils/index.mjs";import{exampleModuleName as p}from"./vm/example.mjs";import u from"./vm/info.mjs";import{CONFIG as h}from"./config.mjs";import d from"./plugins.config.mjs";import{isCI as f,isDev as g,isLibrary as b,NODE_ENV as y,packageJson as j}from"./process-env.mjs";export const outputConfig={path:c(b?"docs":"dist"),filename:"js/[name].[contenthash].bundle.js",chunkFilename:"js/[contenthash].chunk.js",assetModuleFilename:t=>{let o=e(t.filename||"").substring(1);return`assets/${o}/[hash][ext]`},library:{name:`${u.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${j.name}`,pathinfo:g,clean:!g,publicPath:h.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${u.projectName}`};let v={main:[m("@app/entry")]},P=[t(s.corePath,"./polyfills/public-path.mjs")];if(h.refresh&&h.env.injectRemoteReactRefresh&&P.push(t(s.corePath,"./polyfills/inject-react-refresh.mjs")),h.polyfill&&P.push(t(s.corePath,"./polyfills/replace-children.mjs")),h.entry&&("string"==typeof h.entry?v={...v,main:[h.entry]}:Object.keys(h.entry)&&(v=Object.assign(v,h.entry))),"string"==typeof v.main?v.main=[...P,v.main]:Array.isArray(v.main)&&(v.main=[...P,...v.main]),h.output){if("string"==typeof h.output)outputConfig.path=h.output;else if(Object.keys(h.output)){let e=h.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof h.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let C={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:s.webpackCachePath,memoryCacheUnaffected:!0,name:`.${[n,y].filter(Boolean).join("-")}`,version:`${j.version}`,buildDependencies:{config:a},maxMemoryGenerations:1};!1===h.cache?C=!1:l(h.cache)&&(C=Object.assign(C,h.cache)),f&&(void 0===h.cache||h.cache&&!h.cache.cacheDirectory)&&(C.cacheDirectory=o(i,j.name));export const commonConfig={name:"client",target:"web",devtool:h.devtool,entry:v,mode:g?"development":"production",stats:"errors-only",cache:C,snapshot:{immutablePaths:[s.pnpmNodeModules,s.denoNodeModules,/node_modules\/(?!(@app)\/)/],managedPaths:[s.pnpmNodeModules,s.denoNodeModules,/node_modules\/(?!(@app)\/)/],resolveBuildDependencies:{timestamp:!0,hash:!0},resolve:{timestamp:!0,hash:!0},module:{timestamp:!0,hash:!0},buildDependencies:{timestamp:!0,hash:!0},contextModule:{timestamp:!0,hash:!0}},infrastructureLogging:{level:"error"},externalsPresets:h.externalsPresets,plugins:d,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!0,lazyCompilation:h.lazyCompilation&&g&&{imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(m(p))||t.startsWith(m("@app/comment"))||t.startsWith(s.pagesPath)||t.startsWith(s.componentsPath)))}},buildHttp:l(h.buildHttp)?{allowedUris:[],lockfileLocation:o(s.httpCachePath,"http.lock"),cacheLocation:o(s.httpCachePath,"data"),upgrade:!0,...h.buildHttp}:h.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:h.alias,modules:[s.nodeModules,s.pnpmNodeModules,s.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:h.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:h.externals,output:outputConfig,recordsPath:h.recordsPath?t(s.programPath,h.recordsPath):t(s.webpackCachePath,"records.json")};h.overrideResolve&&commonConfig.resolve.plugins.push(new r(Object.assign({original:h.alias["@"],override:n&&c(n)},h.overrideResolve)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@moneko/eslint/react-jsx";export default e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@moneko/eslint/react-legacy";export default e;
|
package/lib/vm/render-app.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CONFIG as e}from"../config.mjs";import{APPTYPE as r,frameworkVersion as t,isDev as o}from"../process-env.mjs";let n=t<18,a="hash"===e.routerMode,c=a?"HashRouter":"BrowserRouter",s=e.strict?"StrictMode":"",m=`<${s}><${c} basename={${a?'"/"':"basename"}} window={window}><ErrorBoundary><App /></ErrorBoundary></${c}></${s}>`,p=
|
|
1
|
+
import{CONFIG as e}from"../config.mjs";import{APPTYPE as r,frameworkVersion as t,isDev as o}from"../process-env.mjs";let n=t<18,a="hash"===e.routerMode,c=a?"HashRouter":"BrowserRouter",s=e.strict?"StrictMode":"",m=`<${s}><${c} basename={${a?'"/"':"basename"}} window={window}><ErrorBoundary><App /></ErrorBoundary></${c}></${s}>`,p=e.refresh&&e.env.injectRemoteReactRefresh?"window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(ReactDOM);":"",i=`
|
|
2
2
|
import ReactDOM from '${n?"react-dom":"react-dom/client"}';
|
|
3
3
|
import React, { StrictMode, type ReactElement } from 'react';
|
|
4
4
|
import { ErrorBoundary } from '@moneko/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.56.9
|
|
3
|
+
"version": "3.56.9",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -55,6 +55,26 @@
|
|
|
55
55
|
"default": "./lib/lint/eslint/react.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"./eslint/react-legacy": {
|
|
59
|
+
"import": {
|
|
60
|
+
"types": "./lib/lint/eslint/react-legacy.d.mts",
|
|
61
|
+
"default": "./lib/lint/eslint/react-legacy.mjs"
|
|
62
|
+
},
|
|
63
|
+
"default": {
|
|
64
|
+
"types": "./lib/lint/eslint/react-legacy.d.mts",
|
|
65
|
+
"default": "./lib/lint/eslint/react-legacy.mjs"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"./eslint/react-jsx": {
|
|
69
|
+
"import": {
|
|
70
|
+
"types": "./lib/lint/eslint/react-jsx.d.mts",
|
|
71
|
+
"default": "./lib/lint/eslint/react-jsx.mjs"
|
|
72
|
+
},
|
|
73
|
+
"default": {
|
|
74
|
+
"types": "./lib/lint/eslint/react-jsx.d.mts",
|
|
75
|
+
"default": "./lib/lint/eslint/react-jsx.mjs"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
58
78
|
"./eslint/vue": {
|
|
59
79
|
"import": {
|
|
60
80
|
"types": "./lib/lint/eslint/vue.d.mts",
|
|
@@ -138,10 +158,10 @@
|
|
|
138
158
|
},
|
|
139
159
|
"devDependencies": {
|
|
140
160
|
"@moneko/css": "1.2.0",
|
|
161
|
+
"@types/react-refresh": "0.14.6",
|
|
141
162
|
"@types/stylis": "4.2.7",
|
|
142
163
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
143
164
|
"@types/webpack-hot-middleware": "2.25.11",
|
|
144
|
-
"@types/react-refresh": "0.14.6",
|
|
145
165
|
"sass": "1.93.2",
|
|
146
166
|
"sass-loader": "16.0.5",
|
|
147
167
|
"solid-refresh": "0.7.5",
|