@moneko/core 3.56.14-beta.2 → 3.56.14-beta.4

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.
@@ -1 +1 @@
1
- import e from"mini-css-extract-plugin";import i from"webpack";import{merge as n}from"webpack-merge";import{commonConfig as t}from"../common.mjs";import{CONFIG as r}from"../config.mjs";import{LightningCssMinifyPlugin as m}from"../plugin/lightningcss-plugin.mjs";import{SwcMinifyPlugin as s}from"../plugin/swc-minify-plugin.mjs";import{getLightningCssTargets as l}from"../polyfills/targets.mjs";let o=[];r.minifier&&(o.push(new s(r.minifier)),o.push(new m({targets:l()})));let p={maxAssetSize:256e3,maxEntrypointSize:256e3,assetFilter:e=>!e.endsWith(".map")&&!e.endsWith("ce28377f3a428346.js"),...r.performance},a=n(t,{performance:r.performance&&p,plugins:[new e({filename:"style/[contenthash].css",chunkFilename:"style/[contenthash].css",ignoreOrder:!0})],optimization:{splitChunks:r.splitChunk,runtimeChunk:r.runtimeChunk,chunkIds:"deterministic",moduleIds:"deterministic",concatenateModules:!0,emitOnErrors:!1,removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,minimize:!0,minimizer:o,sideEffects:!0,providedExports:!0,flagIncludedChunks:!0,innerGraph:!1,mangleExports:"deterministic",portableRecords:!0,realContentHash:!1}});if(r.splitChunk&&a.plugins?.push(new i.optimize.MinChunkSizePlugin({minChunkSize:r.minChunkSize||1e3})),r.bundleAnalyzer){let e=(await import("webpack-bundle-analyzer")).BundleAnalyzerPlugin;a.plugins?.push(new e({analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1,defaultSizes:"gzip",logLevel:"silent",...r.bundleAnalyzer}))}export default a;
1
+ import e from"mini-css-extract-plugin";import i from"webpack";import{merge as n}from"webpack-merge";import{commonConfig as t}from"../common.mjs";import{CONFIG as r}from"../config.mjs";import{LightningCssMinifyPlugin as s}from"../plugin/lightningcss-plugin.mjs";import{SwcMinifyPlugin as m}from"../plugin/swc-minify-plugin.mjs";import{getLightningCssTargets as l}from"../polyfills/targets.mjs";import{isDev as p,isReact as o}from"../process-env.mjs";let a=[];r.minifier&&(a.push(new m(r.minifier)),a.push(new s({targets:l()})));let u={maxAssetSize:256e3,maxEntrypointSize:256e3,assetFilter:e=>!e.endsWith(".map")&&!e.endsWith("ce28377f3a428346.js"),...r.performance},c=n(t,{performance:r.performance&&u,plugins:[new e({filename:"style/[contenthash].css",chunkFilename:"style/[contenthash].css",ignoreOrder:!0})],optimization:Object.assign({splitChunks:r.splitChunk,runtimeChunk:r.runtimeChunk,minimize:!0,minimizer:a},{chunkIds:"deterministic",moduleIds:"deterministic",concatenateModules:!0,emitOnErrors:!1,removeAvailableModules:!0,removeEmptyChunks:!0,mergeDuplicateChunks:!0,sideEffects:!0,providedExports:!0,flagIncludedChunks:!0,innerGraph:!1,mangleExports:"deterministic",portableRecords:!0,realContentHash:!1})});if(p&&r.refresh&&(c.plugins.push(new i.HotModuleReplacementPlugin),o)){let e=(await import("@pmmmwh/react-refresh-webpack-plugin")).default;c.plugins.push(new e({overlay:!1}))}if(r.splitChunk&&c.plugins?.push(new i.optimize.MinChunkSizePlugin({minChunkSize:r.minChunkSize||1e3})),r.bundleAnalyzer){let e=(await import("webpack-bundle-analyzer")).BundleAnalyzerPlugin;c.plugins?.push(new e({analyzerMode:"static",reportFilename:"report.html",openAnalyzer:!1,defaultSizes:"gzip",logLevel:"silent",...r.bundleAnalyzer}))}export default c;
package/lib/common.mjs CHANGED
@@ -1 +1 @@
1
- import{extname as e,join as t,resolve as o}from"node:path";import{argv as s}from"node:process";import a,{config_files as i,CUSTOMCONFIG as n,TMP_DIR as r}from"./commom/paths.mjs";import{OverrideResolverPlugin as l}from"./plugin/override-resolve.mjs";import{digest as m,isObject as c,node_modules as p,resolveProgram as u}from"./utils/index.mjs";import{exampleModuleName as h}from"./vm/example.mjs";import d from"./vm/info.mjs";import{CONFIG as f}from"./config.mjs";import b from"./plugins.config.mjs";import{isCI as g,isDev as y,isLibrary as j,NODE_ENV as v,packageJson as P}from"./process-env.mjs";let C=f.mode??(y?"development":"production");export const outputConfig={path:u(j?"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:`${d.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${P.name}`,pathinfo:y,clean:!y,publicPath:f.publicPath,workerPublicPath:f.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${d.projectName}`};let x={main:[p("@app/entry")]},k=[t(a.corePath,"./polyfills/public-path.mjs")];if(y&&f.refresh&&f.env.injectRemoteReactRefresh&&k.push(t(a.corePath,"./polyfills/inject-react-refresh.mjs")),f.polyfill&&k.push(t(a.corePath,"./polyfills/replace-children.mjs")),f.entry&&("string"==typeof f.entry?x={...x,main:[f.entry]}:Object.keys(f.entry)&&(x=Object.assign(x,f.entry))),"string"==typeof x.main?x.main=[...k,x.main]:Array.isArray(x.main)&&(x.main=[...k,...x.main]),f.output){if("string"==typeof f.output)outputConfig.path=f.output;else if(Object.keys(f.output)){let e=f.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof f.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let M={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!0,name:`.${await m([s[2],n,v].join("-"),"SHA-256")}`,version:`${P.version}`,buildDependencies:{config:i},maxMemoryGenerations:1};!1===f.cache?M=!1:c(f.cache)&&(M=Object.assign(M,f.cache)),g&&(void 0===f.cache||f.cache&&!f.cache.cacheDirectory)&&(M.cacheDirectory=o(r,P.name));let w={},O={imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(p(h))||t.startsWith(p("@app/comment"))||t.startsWith(a.pagesPath)||t.startsWith(a.componentsPath)))}};f.lazyCompilation&&y&&"true"!==process.env.IS_BUILD?c(f.lazyCompilation)?Object.assign(w,O,f.lazyCompilation):Object.assign(w,O):w=!1;export const commonConfig={name:"client",target:"web",devtool:f.devtool,entry:x,mode:C,stats:"errors-only",cache:M,snapshot:{immutablePaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],managedPaths:[a.pnpmNodeModules,a.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:f.externalsPresets,plugins:b,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!0,lazyCompilation:w,buildHttp:c(f.buildHttp)?{allowedUris:[],lockfileLocation:o(a.httpCachePath,"http.lock"),cacheLocation:o(a.httpCachePath,"data"),upgrade:!0,...f.buildHttp}:f.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:f.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:f.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:f.externals,output:outputConfig,recordsPath:f.recordsPath?t(a.programPath,f.recordsPath):t(a.webpackCachePath,"records.json")};f.overrideResolve&&commonConfig.resolve.plugins.push(new l(Object.assign({original:f.alias["@"],override:n&&u(n)},f.overrideResolve)));
1
+ import{extname as e,join as t,resolve as o}from"node:path";import{argv as s}from"node:process";import a,{config_files as i,CUSTOMCONFIG as n,TMP_DIR as r}from"./commom/paths.mjs";import{OverrideResolverPlugin as l}from"./plugin/override-resolve.mjs";import{digest as m,isObject as c,node_modules as p,resolveProgram as u}from"./utils/index.mjs";import{exampleModuleName as h}from"./vm/example.mjs";import d from"./vm/info.mjs";import{CONFIG as f}from"./config.mjs";import b from"./plugins.config.mjs";import{isCI as g,isDev as y,isLibrary as j,NODE_ENV as v,packageJson as P}from"./process-env.mjs";let C=f.mode??(y?"development":"production");export const outputConfig={path:u(j?"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:`${d.projectName}`,type:"umd",umdNamedDefine:!0},globalObject:"self",chunkLoadingGlobal:`webpackJsonp_${P.name}`,pathinfo:y,clean:!y,publicPath:f.publicPath,workerPublicPath:f.publicPath,asyncChunks:!0,charset:!0,iife:!0,crossOriginLoading:"use-credentials",enabledWasmLoadingTypes:["fetch"],uniqueName:`${d.projectName}`};let x={main:[p("@app/entry")]},k=[t(a.corePath,"./polyfills/public-path.mjs")];if(y&&f.refresh&&f.env.injectRemoteReactRefresh&&k.push(t(a.corePath,"./polyfills/inject-react-refresh.mjs")),f.polyfill&&k.push(t(a.corePath,"./polyfills/replace-children.mjs")),f.entry&&("string"==typeof f.entry?x={...x,main:[f.entry]}:Object.keys(f.entry)&&(x=Object.assign(x,f.entry))),"string"==typeof x.main?x.main=[...k,x.main]:Array.isArray(x.main)&&(x.main=[...k,...x.main]),f.output){if("string"==typeof f.output)outputConfig.path=f.output;else if(Object.keys(f.output)){let e=f.output,t={...outputConfig.library};Object.assign(outputConfig,e),"object"==typeof f.output&&e.library&&(outputConfig.library=Object.assign(t,e.library))}}let M={type:"filesystem",allowCollectingMemory:!0,cacheDirectory:a.webpackCachePath,memoryCacheUnaffected:!("true"===process.env.IS_BUILD&&y),name:await m([s[2],n,v].join("-"),"SHA-256"),version:`${P.version}`,buildDependencies:{config:i},maxMemoryGenerations:1};!1===f.cache?M=!1:c(f.cache)&&(M=Object.assign(M,f.cache)),g&&(void 0===f.cache||f.cache&&!f.cache.cacheDirectory)&&(M.cacheDirectory=o(r,P.name));let w={},D={imports:!0,entries:!0,test:e=>{let t=e.nameForCondition();return!!(t&&(t.startsWith(p(h))||t.startsWith(p("@app/comment"))||t.startsWith(a.pagesPath)||t.startsWith(a.componentsPath)))}};f.lazyCompilation&&y&&"true"!==process.env.IS_BUILD?c(f.lazyCompilation)?Object.assign(w,D,f.lazyCompilation):Object.assign(w,D):w=!1;export const commonConfig={name:"client",target:"web",devtool:f.devtool,entry:x,mode:C,stats:"errors-only",cache:M,snapshot:{immutablePaths:[a.pnpmNodeModules,a.denoNodeModules,/node_modules\/(?!(@app)\/)/],managedPaths:[a.pnpmNodeModules,a.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:f.externalsPresets,plugins:b,node:{global:!1,__filename:!1,__dirname:!1},experiments:{asyncWebAssembly:!0,cacheUnaffected:!("true"===process.env.IS_BUILD&&y),lazyCompilation:w,buildHttp:c(f.buildHttp)?{allowedUris:[],lockfileLocation:o(a.httpCachePath,"http.lock"),cacheLocation:o(a.httpCachePath,"data"),upgrade:!0,...f.buildHttp}:f.buildHttp,backCompat:!0,futureDefaults:!0,css:!1,outputModule:!1},resolve:{extensions:[".mts",".mjs",".ts",".tsx",".js",".jsx",".json",".wasm"],alias:f.alias,modules:[a.nodeModules,a.pnpmNodeModules,a.denoNodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:f.resolvePlugins,preferAbsolute:!0,cache:!0,fallback:{}},externals:f.externals,output:outputConfig,recordsPath:f.recordsPath?t(a.programPath,f.recordsPath):t(a.webpackCachePath,"records.json")};f.overrideResolve&&commonConfig.resolve.plugins.push(new l(Object.assign({original:f.alias["@"],override:n&&u(n)},f.overrideResolve)));
package/lib/config.mjs CHANGED
@@ -1 +1 @@
1
- import{join as e,relative as o}from"node:path";import t from"node:process";import{fileExists as r}from"@moneko/utils";import{merge as n}from"webpack-merge";import s from"./commom/paths.mjs";import a from"./commom/require.mjs";import i from"./commom/setup-env.mjs";import l from"./options/jsx-dom-expressions.mjs";import m from"./options/split-chunk.mjs";import{isFunction as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{APPTYPE as d,FRAMEWORK as f,frameworkVersion as h,isCI as g,isDev as v,isLibrary as x,isMobile as j,isReact as C,jsxImportSource as P,mainDirectory as k,NODE_ENV as b,PACKAGENAME as w}from"./process-env.mjs";let O=["@app","@moneko","neko-ui",".cache/http/data","@element-plus","ant-design-vue","element-plus","element-ui","ng-zorro-antd","@mui","@du","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design","monaco-editor"];export function getConfig(e){return delete a.cache[e],new Promise(o=>{if(r(e)){let r=a(e).default;return o(p(r)?r(t):r)}return o({})})}let y=await Promise.all([i(b,d,f,[],"development"!==b),getConfig(s.configPath),getConfig(s.customConfigPath)]),S=y[0],M=y[1],I=y[2],z={mode:b,strict:!1,devtool:v?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:"",namespace:w,moduleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]",fallbackModuleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]"},env:S,basename:"/",publicPath:"auto",rem:{designSize:j?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":u(k)},C&&h<18?{"react/package.json":c("react/package.json"),"react/jsx-runtime":c("react/jsx-runtime.js"),"react/jsx-dev-runtime":c("react/jsx-dev-runtime.js")}:{}),moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3,open:!0},htmlPluginOption:{title:w.toLocaleUpperCase(),favicon:o(s.programPath,`${s.corePath}/options/favicon.ico`)},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:m,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:O,js:O,media:O,font:O,wasm:[]},mdx:{jsx:!1,development:v,jsxImportSource:P,providerImportSource:`@moneko/${f}/mdx`},jsxDomExpressions:l,bar:{name:"Client",nameColor:"68",msgColor:"242",barBgColor:"15",barColor:"69",quiet:g},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:"solid"!==f,bundleId:"com.moneko.bid",bundles:[],stylelint:{},eslint:{lintDirtyModulesOnly:!1},minChunkSize:1e3,compression:v,manifest:{filename:"manifest.json"},corepack:!0,reactJsxRuntime:"automatic"};x&&(z.alias=Object.assign(z.alias,{"@pkg":s.componentsPath,[w]:s.componentsPath}));let F=z;(!1===(F=n(F,M,I)).devtool||!1===F.sourceMap)&&(F.sourceMap=!1,F.devtool=!1),"true"===t.env.CODESPACES&&(F.devServer.https=!1),!1===F.devServer.https&&"darwin"===t.platform&&(F.devServer.open=!1),F.htmlPluginOption&&(F.htmlPluginOption.tags||(F.htmlPluginOption.tags=[]),F.fixBrowserRouter&&F.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}),F.manifest&&F.htmlPluginOption.tags.push({href:e(F.basename,F.manifest.filename).replaceAll(/\\/g,"/"),tag:"link",rel:"manifest"}));export const CONFIG=F;export const PUBLICPATH="auto"===CONFIG.publicPath?"":CONFIG.publicPath;
1
+ import{join as e,relative as o}from"node:path";import t from"node:process";import{fileExists as r}from"@moneko/utils";import{merge as n}from"webpack-merge";import a from"./commom/paths.mjs";import s from"./commom/require.mjs";import i from"./commom/setup-env.mjs";import l from"./options/jsx-dom-expressions.mjs";import m from"./options/split-chunk.mjs";import{isFunction as p,node_modules as c,resolveProgram as u}from"./utils/index.mjs";import{APPTYPE as d,FRAMEWORK as f,frameworkVersion as h,isCI as g,isDev as v,isLibrary as x,isMobile as j,isReact as C,jsxImportSource as P,mainDirectory as k,NODE_ENV as b,PACKAGENAME as w}from"./process-env.mjs";let O=["@app","@moneko","neko-ui",".cache/http/data","@element-plus","ant-design-vue","element-plus","element-ui","ng-zorro-antd","@mui","@du","@fontsource","@fortawesome","font-pingfang-sc","font-pingfang-tc","katex","react-markdown-editor-lite","react-photo-view","schema-design","monaco-editor"];export function getConfig(e){return delete s.cache[e],new Promise(o=>{if(r(e)){let r=s(e).default;return o(p(r)?r(t):r)}return o({})})}let S=await Promise.all([i(b,d,f,[],"true"===t.env.IS_BUILD),getConfig(a.configPath),getConfig(a.customConfigPath)]),y=S[0],I=S[1],M=S[2],z={mode:b,strict:!1,devtool:v?"eval-cheap-module-source-map":"cheap-module-source-map",seo:!1,bundleAnalyzer:!1,polyfill:!1,entry:{},minifier:{},sourceMap:{filename:"[file].map",publicPath:"",namespace:w,moduleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]",fallbackModuleFilenameTemplate:"moneko://[namespace]/[resource-path]?[loaders]"},env:y,basename:"/",publicPath:"auto",rem:{designSize:j?375:1920},fallbackCompPath:null,modifyVars:{},prefixCls:"n",alias:Object.assign({"@":u(k)},C&&h<18?{"react/package.json":c("react/package.json"),"react/jsx-runtime":c("react/jsx-runtime.js"),"react/jsx-dev-runtime":c("react/jsx-dev-runtime.js")}:{}),moduleRules:[],prefixJsLoader:[],cssModules:[],cssModuleDefinition:!0,importOnDemand:{},proxy:{},devServer:{host:"localhost",port:3e3,open:!0},htmlPluginOption:{title:w.toLocaleUpperCase(),favicon:o(a.programPath,`${a.corePath}/options/favicon.ico`)},copy:{},routerMode:"browser",fixBrowserRouter:!1,plugins:[],resolvePlugins:[],overrideResolve:!1,splitChunk:m,runtimeChunk:"single",moduleFederation:[],rulesInclude:{css:O,js:O,media:O,font:O,wasm:[]},mdx:{jsx:!1,development:v,jsxImportSource:P,providerImportSource:`@moneko/${f}/mdx`},jsxDomExpressions:l,bar:{name:"Client",nameColor:"68",msgColor:"242",barBgColor:"15",barColor:"69",quiet:g},normalizeCss:!0,externalsPresets:{},buildHttp:void 0,virtualModule:{},cssExtract:{},externals:["@swc/core"],lazyCompilation:!1,performance:!1,refresh:!0,bundleId:"com.moneko.bid",bundles:[],stylelint:{},eslint:{lintDirtyModulesOnly:!1},minChunkSize:1e3,compression:v,manifest:{filename:"manifest.json"},corepack:!0,reactJsxRuntime:"automatic"};x&&(z.alias=Object.assign(z.alias,{"@pkg":a.componentsPath,[w]:a.componentsPath}));let D=z;(!1===(D=n(D,I,M)).devtool||!1===D.sourceMap)&&(D.sourceMap=!1,D.devtool=!1),"true"===t.env.CODESPACES&&(D.devServer.https=!1),!1===D.devServer.https&&"darwin"===t.platform&&(D.devServer.open=!1),D.htmlPluginOption&&(D.htmlPluginOption.tags||(D.htmlPluginOption.tags=[]),D.fixBrowserRouter&&D.htmlPluginOption.tags.push({textContent:"(function(l) {if (l.search[1] === '/' ) {var decoded = l.search.slice(1).split('&').map(function(s) {return s.replace(/~and~/g, '&')}).join('?');window.history.replaceState(null, null,l.pathname.slice(0, -1) + decoded + l.hash);}}(window.location))"}),D.manifest&&D.htmlPluginOption.tags.push({href:e(D.basename,D.manifest.filename).replaceAll(/\\/g,"/"),tag:"link",rel:"manifest"}));export const CONFIG=D;export const PUBLICPATH="auto"===CONFIG.publicPath?"":CONFIG.publicPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.56.14-beta.2",
3
+ "version": "3.56.14-beta.4",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",
@@ -661,7 +661,7 @@ export declare interface SharedConfig {
661
661
  /**
662
662
  *应提供共享范围的提供的模块。如果在共享作用域中找不到共享模块或版本无效,则还充当回退模块。默认为属性名称。
663
663
  */
664
- import?: number;
664
+ import?: number | string;
665
665
  /**
666
666
  *软件包名称,用于从描述文件中确定所需的版本。仅当无法根据请求自动确定包名称时才需要。
667
667
  */
@@ -669,7 +669,7 @@ export declare interface SharedConfig {
669
669
  /**
670
670
  *共享范围中来自模块的版本要求。
671
671
  */
672
- requiredVersion?: number;
672
+ requiredVersion?: number | string;
673
673
  /**
674
674
  *在共享范围内的此键下查找模块。
675
675
  */
@@ -689,7 +689,7 @@ export declare interface SharedConfig {
689
689
  /**
690
690
  *所提供模块的版本。将替换较低的匹配版本,但不会替换较高的版本。
691
691
  */
692
- version?: number;
692
+ version?: number | string;
693
693
  }
694
694
 
695
695
  export type SourceMapDevToolPluginOptions = ConstructorParameters<typeof SourceMapDevToolPlugin>[0];