Modern.js is a web engineering system, including a web framework and a npm package solution.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] about 2 years ago
feat: add production env for release command
feat: 为 release 命令增加 production 环境变量
feat: support custom solution list
feat: 生成器支持自定义工程方案列表
feat: upgrade husky version
feat: 升级生成器模板 husky 版本
feat: upgrade @modern-js/plugin-jarvis
husky version to 8
feat: 升级 @modern-js/plugin-jarvis
husky 版本为 8
feat: support custom umd module name by 'getModuleId'
feat: 支持自定义umd模块名通过设置'getModuleId'
feat: base template set pnpm strict-peer-deoebdebcues config
feat: 生成器添加 pnpm strict-peer-deoebdebcues 配置
feat: release command support pnpm v7
feat: release 命令支持 pnpm v7
fix(server): failed to access static files when output.assetPrefix ends with /
fix(server): 修复 output.assetPrefix 以 / 结尾时无法正确访问的问题
fix: register microApps before loadApp
fix:修复手动控制子应用加载情况下未注册子应用问题
fix: upgrade command ignore electron, codesmith, reduck packages
fix: 升级工具支持忽略 electron、codesmith、reduck 相关包
Published by caohuilin about 2 years ago
chore: electron ts template use electron.config.js
chore: electron ts 模版使用electron.config.js
配置
feat: support etag in dev server by default
feat: 开发环境默认支持 etag 功能
chore: add assets retry plugin
chore: 增加资源重试插件
chore(utils): add RULE.JS_DATA_URI to CHAIN_ID
chore(utils): CHAIN_ID 增加 RULE.JS_DATA_URI 值
update electron template dep: @modern-js/plugin-electron
升级 electron 模版中的 @modern-js/plugin-electron
依赖版本
fix: the compaire-version throw error make the supportModern error
fix: compaire-version 的抛错导致 supportModern 失败
fix: tools.devServer type missing some properties
fix: 修复 tools.devServer 类型定义不完整的问题
fix(plugin): incorrect createManager type in TS 4.8
fix(plugin): 修复 createManager 在 TS 4.8 下的类型问题
fix: dev server config should be optional
fix: devServer 配置项应该是可选配置的
fix: invoke next() in dev-middleware directly if only api
fix: 在 api 服务的情况下,直接调用 next(),不执行 dev-middleware
fix: fix MApp can not pass props to microapp and fix closure causes loadable invalid
fix: 修复 MApp 无法传递 props 问题,修复 loadable setstate 闭包问题导致 state 更新异常
fix: alias should take precedence over package name
fix: 编译时,别名的优先级应该高于包名
fix: fix the problem that the response header cannot be redirected when setting in ssr
fix: 修复在 SSR 中设置响应头却无法重定向的问题
fix: ssr bundle should not be compiled by ts-node
fix: ts-node 不应该编译 ssr bundle
fix: fix dev server type error
fix: 修复 dev server 中的类型错误
fix: use output.publicPath(default) as webpack-dev-middleware publicPath
fix: 使用 output.publicPath 作为 webpack-dev-middleware publicPath
Published by github-actions[bot] about 2 years ago
feat: change hmr sock path to /webpack-hmr
feat: 热更新 socket 请求的 path 修改为 /webpack-hmr
feat: remove generator create project enable less and sass function
feat: 移除生成器创建项目支持开启 Less 和 Sass 能力
chore(server): export DevServerOptions type
chore(server): 导出 DevServerOptions 类型
feat: use typescript instead of babel as typescript compiler in server
feat: 服务端,增加 typescript 作为 typescipt 编译器
feat: upgrade tools support prompting users to already have the latest version
feat: 升级工具支持提示用户当前项目依赖已经为最新版本
fix: update upgrade command descrption
fix: 更新 upgrade 命令描述信息
feat(server): export DevServerHttpsOptions type
feat(server): 导出 DevServerHttpsOptions 类型
feat: add compiler option for server
feat: 为 server 添加编译选项
feat: add webpack-builder plugin subresource-integrity
feat: 新增 webpack-builder 插件 subresource-integrity
feat: add source.enableAsyncEntry config
feat: 新增 source.enableAsyncEntry 配置项
feat: upgrade support monorepo sub-project
feat: upgrade 命令支持升级 monorepo 子项目依赖版本
feat: add overrideBrowserslist option
feat: 新增 overrideBrowserslist 选项
chore: add inspector plugin
chore: 增加 Inspector 插件
Published by caohuilin about 2 years ago
feat(utils): add TOML to CHAIN_ID.RULE
feat(utils): 向 CHAIN_ID.RULE 中增加新常量 TOML
feat: runtime export utils not write d.ts file
feat: runtime 生成 export 函数不再支持生成 d.ts 文件
feat(babel-preset-app): bump core-js version to support more polyfills
feat(babel-preset-app): 升级默认的 core-js 版本,支持更多 polyfill
feat: add upgrade tools and command
feat: 增加升级工具和升级命令
feat: new command use solution version
feat: new 命令使用当前工程方案对应版本的插件
chore(dev-server): no longer depend on @modern-js/webpack
chore(dev-server): 不再依赖 @modern-js/webpack
feat(utils): add PUG to CHAIN_ID
feat(utils): CHAIN_ID 常量新增 PUG 值
chore: export getAddressUrls method
chore: 导出 getAddressUrls 方法
feat: remove .runtime-exports/index.js
export
feat: 移除 .runtime-exports/index.js
导出
feat(utils): add SVG_ASSET to CHAIN_ID
feat(utils): CHAIN_ID 常量新增 SVG_ASSET 值
fix: runtime type
fix: 修复 runtime 类型定义
fix: useLoader
auto-generated id
fix: 修复 useLoader
自动生成的 id
feat: support react 18 ssr
feat: 支持 React 18 下使用 SSR
feat(utils): add MODULE_DEPENDENCY_ERROR to CHAIN_ID
feat(utils): CHAIN_ID 常量新增 MODULE_DEPENDENCY_ERROR 值
feat(utils): add YAML to CHAIN_ID.RULE
feat(utils): 向 CHAIN_ID.RULE 中增加新常量 YAML
Published by caohuilin about 2 years ago
feat: create new project use modern current latest version
feat: @modern-js/create 创建项目使用 Modern.js 最新依赖版本
feat(utils): add html-cross-origin to CHAIN_ID
feat(utils): CHAIN_ID 常量新增 html-cross-origin 值
chore: support react 18
chore: 支持 React 18
feat: add media rule name to CHAIN_ID constant
feat: 在 CHAIN_ID 常量中新增 media rule
chore: remove all deploy logic and package
chore: 删除所有部署相关的逻辑和包
feat: support frame mode without lambda directories
feat: 支持无 lambda 目录的框架模式
feat: update codesmith package
feat: 升级 codesmith 包版本
fix: check apiOnly while has source.entriesDir
fix: 当配置 source.entriesDir 存在时,apiOnly 检查错误
fix: remove helmet regexp's global tag
fix: 删除 helmet 中正则匹配的全局标记
fix(dev-server): support enable hmr client by webpack target
fix(dev-server): 支持通过 webpack target 来判断是否启用 hmr client
fix: generator schema validate
fix: 修复生成器问题校验失败
fix: compatibility issues of dev server in iOS 10
fix: 修复 dev server 代码在 iOS 10 下的兼容性问题
fix: fix generator plugin new function MaxListenersExceededWarning
fix: 修复生成器插件使用开启工程时 MaxListenersExceededWarning
Published by caohuilin about 2 years ago
从该版本开始,Modern.js 将仓库内所有包版本号保持一致,Release Tag 版本即为版本号!!!
fix: generator template doc link
fix: 修复生成器生成项目文档链接问题
chore: remove @modern-js/plugin-docsite
chore: 移除 @modern-js/plugin-docsite
feat: generate SSR bundle sourcemap
feat: SSR 打包生成 sourcemap
feat: support afterLambdaRegisted
hook
feat: 支持 afterLambdaRegisted
钩子函数
chore(utils): add fs-extra to exports fields
chore(utils): 通过 exports 导出 fs-extra 子路径
feat: adjust new command dependencies position
feat: 调整 new 命令添加依赖位置
feat(webpack): log more detailed error messages
feat(webpack): 打印详细的错误日志
fix(app-tools): should not modify entry when using disableDefaultEntries
fix(app-tools): 修复开启 disableDefaultEntries 后 entry 名称被修改的问题
fix: remove package adapter-helpers and bff runtime export
fix: 移除 adapter-helpers 包和 BFF runtime 导出
fix: add server hook and types
fix: 增加 server hook API
fix: fix runtime context format bug
fix: 修复 runtimeContext 数据格式化时的问题
fix: modify bff-core's types
fix: 修改 bff-core 的 types
fix: Adjust createServer logic in bff test plugin
fix: 调整 BFF 测试中 create server 的逻辑
fix: bff.proxy and devServer.proxy types
fix: 修复 bff.proxy 和 devServer.proxy 类型定义不完整的问题
fix(babel-preset-app): incorrect babel plugin path
fix(babel-preset-app): 修复 babel 插件路径错误的问题
fix(webpack): failed to format error message in some cases
fix(webpack): 修复格式化 webpack 错误信息时报错的问题
chore: remove cookie in error log
chore: 删除错误日志中的 cookie 信息
fix: 修复 SSR 物理降级时,获取不到请求上下文的问题
fix: should get ssrContext anyway if entry is ssr enable
Published by caohuilin about 2 years ago
chore: merge @modern-js/plugin-design-token
to @modern-js/plugin-tailwindcss
chore: 合并 @modern-js/plugin-design-token
到 @modern-js/plugin-tailwindcss
feat: support runtime router and state type
feat: 支持在 modern.config.ts
中提示 runtime.router
and runtime.state
类型
feat: mwa template add runtime types
feat: mwa 生成器模板增加导出 runtime 类型
feat: support runtime masterApp type
feat: 支持在 modern.config.ts
中提示 runtime.masterApp
类型
chore: move pre-bundled ajv to @modern-js/utils
chore: 预打包的 ajv 产物移动至 @modern-js/utils
内
chore(runtime): merge @modern-js/runtime-core
to @modern-js/runtime
chore(runtime): 合并 @modern-js/runtime-core
到 @modern-js/runtime
feat: support bff zod schema use transform/record/lazy
feat: 支持 bff 中 zod schema 使用 transform/record/lazy
fix: @modern-js/plugin-multiprocess
export fields
fix: 修复 @modern-js/plugin-multiprocess
导出字段路径
fix: @modern-js/plugin-esbuild
export fields
fix: 修复 @modern-js/plugin-esbuild
导出字段路径
chore: adjust @modern-js/plugin-garfish
runtime export path
chore: 调整 @modern-js/plugin-garfish
runtime 导出路径
fix(runtime): router plugin replace error
fix(runtime): router 插件 replace 报错
fix: @modern-js/app-tools
export fields
fix: 修复 @modern-js/app-tools
导出字段路径
fix(webpack): incorrect fallback result
fix(webpack): 修复 fallback 的编译产物不符合预期的问题
fix: @modern-js/node-bundle-require
export fields
fix: 修复 @modern-js/node-bundle-require
导出字段路径
fix: @modern-js/plugin-proxy
export fields
fix: 修复 @modern-js/plugin-proxy
导出字段路径
fix: storybook plugin type
fix: 修复 storybook 插件类型
fix: monorepo-tools deploy need to copy lerna.json
fix: Monorepo 中生成产物需复制 lerna.json
文件
fix: @modern-js/plugin-changeset
export fields
fix: 修复 @modern-js/plugin-changeset
导出字段路径
Published by caohuilin about 2 years ago
feat(app-tools): start and inspect command support specify config file
feat(app-tools): start 和 inspect 命令支持指定配置文件
Published by caohuilin about 2 years ago
feat: package manager support isSubProject params
feat: 生成器包管理工具选项支持 isSubProject 参数
chore: lock egg-ts-helper version
chore: 锁定 egg-ts-helper 版本
feat: solution schema support isSubProject params
feat: 生成器工程方案选项支持 isSubProject 参数
#1429 fix assets prefix bug in prod env
feat: storybook generator add react-dom
dependence
feat: storybook 生成器增加 react-dom
依赖
#1422 feat: 支持用户定义 externals 模块
feat: support response headers
feat: 支持设置响应头
Published by caohuilin about 2 years ago
feat(webpack): let css-loader generate ESModules
feat(webpack): css-loader 生成的产物格式由 CommonJS 调整为 ESModules
chore(runtime): merge @modern-js/plugin-state
to @modern-js/runtime
chore(runtime): 合并 @modern-js/plugin-state
到 @modern-js/runtime
feat: support Pipe and Middleware operators
feat: 支持 Pipe 和 Middleware 操作符
chore(create-request): remove @modern-js/plugin-ssr
from @modern-js/create-request
chore(runtime): @modern-js/create-request
中移除 @modern-js/plugin-ssr
依赖
chore(utils): remove unused code
chore(utils): 移除无用代码
chore(server): delete unused @modern-js/server-utils
dependence
chore(server): 删除未使用的 @modern-js/server-utils
依赖
feat(webpack): support source.preEntry config
feat(webpack): 新增 source.preEntry 配置项
chore(runtime): merge @modern-js/plugin-router
to @modern-js/runtime
chore(runtime): 合并 @modern-js/plugin-router
到 @modern-js/runtime
chore(runtime): merge @modern-js/plugin-ssr
to @modern-js/runtime
chore(runtime): 合并 @modern-js/plugin-ssr
到 @modern-js/runtime
chore(runtime): remove @modern-js/create-request
from @modern-js/runtime
chore(runtime): @modern-js/runtime
中移除 @modern-js/create-request
依赖
chore(bff): remove @modern-js/bff-runtime
from @modern-js/runtime
dependence
chore(bff): @modern-js/runtime
中移除 @modern-js/bff-runtime
依赖
chore(server): merge @modern-js/hmr-client
to @modern-js/server
chore(server): 合并 @modern-js/hmr-client
到 @modern-js/server
fix: using typeof window to determine the browser environment is not accurate
fix: 使用 typeof windows 判断浏览器环境不够准确
chore(app-tools): merge @modern-js/analyze
to @modern-js/app-tools
chore(app-tools): 合并 @modern-js/analyze
到 @modern-js/app-tools
chore(generator): use module-tools bundle function to bundle generator package
chore(generator): 使用 module-tools 的 bundle 功能实现生成器打包
fix: ssg build error when multi entries
fix: 修复多入口下 SSG 构建错误
fix: runtime package ssr path export field
fix: 修复 plugin-runtime ssr 路径导出字段
fix: the SSG callback is called once for each baseUrl, when a user configures multiple baseUrl.
fix: 当用户配置了多个 baseUrl 时,将会为每个 baseUrl 调用一次 SSG 回调函数。
fix: the _SERVER_DATA injection twice causes the prod-server route error.
fix: _SERVER_DATA 二次注入,导致服务器路由错误
fix(webpack): failed to import SVG with query from a CSS file
fix(webpack): 修复从 CSS 文件中引用带 query 的 SVG 时出现报错的问题
fix: package exports field
fix: 修复包导出字段
fix: monorepo new command plugin path
fix: 修复 monorepo tools new 命令计算插件路径
fix: Additional compilation fields
fix: 补充 compilation 字段
fix: allow BFF function to return void
fix: 允许 BFF 函数返回 void
Published by caohuilin over 2 years ago
chore(testing): merge @modern-js/testing-plugin-bff
to @modern-js/plugin-testing
chore(testing): 合并 @modern-js/testing-plugin-bff
到 @modern-js/plugin-testing
chore(testing): delete @modern-js/bff-utils
chore(testing): 删除 @modern-js/bff-utils
chore(testing): merge @modern-js/testing
to @modern-js/plugin-testing
chore(testing): 合并 @modern-js/testing
到 @modern-js/plugin-testing
feat: add addRuntimeExports hooks for module-tools
feat: 为 module-tools 添加 addRuntimeExports 钩子
Published by caohuilin over 2 years ago
chore(generator): remove unbundle from generator options
chore(generator): 不再支持通过 new 命令开启 unbundle 功能
chore(core): move Hooks types define to @modern-js/core
chore(core): 移动 Hooks 类型定义到 @modern-js/core
包
chore(plugin-i18n): merge @modern-js/i18n-cli-language-detector
to @modern-js/plugin-i18n
chore(plugin-i18n): 合并 @modern-js/i18n-cli-language-detector
包到 @modern-js/plugin-i18n
包作为子路径
feat: rumtime config types
feat: 补充 runtime 配置类型
feat: support ListenOptions for prod-server
feat: server 支持传入 listernOptions 参数
chore(core): merge @modern-js/load-config
package to @modern-js/core
utils
chore(core): 合并 @modern-js/load-config
包到 @modern-js/core
包作为 utils 函数
feat: add onApiChange
hook for bff hot reload
feat: 为 BFF 热更新优化,添加 onApiChange
钩子
feat: optimize release note
feat: 优化 Release Note 格式
feat: @modern-js/module-tools
remove @modern-js/plugin-analyze plugin
feat: @modern-js/module-tools
移除 @modern-js/plugin-analyze
插件
feat: prod-server supports that load server env from .env.\*
feat: prod-server 支持从 .env.*
文件加载服务器环境变量
perf(webpack): improve getSourceInclude
performance
perf(webpack): 优化 getSourceInclude
执行性能
feat: @modern-js/plugin-storybook
add @modern-js/plugin-analyze
plugin
feat: @modern-js/plugin-storybook
添加 @modern-js/plugin-analyze
插件
chore(generator-utils): tidy up @modern-js/generator-utils
func
chore(generastor-utils): 整理 @modern-js/generator-utils
导出方法
chore(types): delete http-proxy-middleware
dependence(unused)
chore(types): 删除未使用依赖 http-proxy-middleware
chore(babel-chain): merge @modern-js/babel-chain
to @modern-js/babel-preset-base
chore(babel-chain): 合并 @modern-js/babel-chain
到 @modern-js/babel-preset-base
chore(plugin-storybook): remove @modern-js/esbuild-compiler
from dependencies
chore(plugin-storybook): 移除 @modern-js/esbuild-compiler
依赖
fix(webpack): failed to analyze bundle
fix(webpack): 修复使用 bundle analyze 时报错的问题
fix: ignore cjs and mjs in d.ts bundle
fix: 对 d.ts 做 bundle 时忽略 cjs 和 mjs 资源
feat: update codesmith json api version
feat: 升级 @modern-js/codesmith-api-json
版本
fix(webpack): failed to compile .cjs,.cts,.mts file
fix(webpack): 修复无法编译 .cjs,.cts,.mts 文件的问题
fix: monorepo-tools new command plugin params not work
fix: 修复 monorepo-tools new 命令 plugin 参数不生效问题
fix(generator-plugin): remove addManyFiles
destination empty validate
fix(generator-plugin): 移除 addManyFiles
destination 参数为空的校验
Published by caohuilin over 2 years ago
[#1313] chore(webpack): refactor webpack config, split modules (chore(webpack): 重构 webpack 配置,拆分模块)
[#1323] feat: change webpack output.publicPath
for plugin-storybook
(feat: 修改 plugin-storybook 的 webpack output.publicPath
配置)
[#1325] perf(webpack): optimize terser default options (perf(webpack): 优化 Terser 默认压缩配置,提升压缩率)
[#1306] feat: add gen-release-note
command to generator template (feat: 生成器模板增加 gen-release-note
命令)
[#1326] feat: optimize implentation of registerModernRuntimePath
(feat: 优化 registerModernRuntimePath
的实现)
[#1319] fix: use client init data first if exist (fix: 优先使用用户定义的 init 数据)
[#1330] fix: ssg load plugin correctly(fix: 修复 SSG 加载插件不正确问题)
[#1327] Add additionalProperties: false
to the schema of output.buildConfig
(fix: output.buildConfig
的 schema 增加 additionalProperties: false
配置)
[#1324] fix(webpack): should not inject CSS sourcemap in js bundles (fix(webpack): 修复使用 style-loader 时会将 CSS 的 SourceMap 打包到 JS 中的问题)
[#1320] fix(webpack): failed to import SVG from a CSS file in some cases (fix(webpack): 修复从 CSS 文件中引用 SVG 图片时,可能会出现编译报错的问题)
[#1331] fix(css-config): css minify not work when using style-loader
(fix(css-config): 修复使用 style-loader
时,CSS 代码未被压缩的问题)
Published by targeral over 2 years ago
Features
output.buildConfig
和 output.buildPreset
配置。tools.speedy
配置output.packageMode
以及 output.packageFields
,并提供了 @deprecated
标记和提示。Published by caohuilin over 2 years ago
Features
css-loader
#1252
twin.macro
#1232
App.init
中返回数据,在 context
中通过 initialData
获取,并支持在 SSR 渲染时插入到 HTML window._SSR_DATA
中 #1265
@modern-js/plugin-jarvis
依赖内置到工程方案工具包(@modern-js/app-tools
、@modern-js/module-tools
、@modern-js/monorepo-tools
)中,并移除初始化项目时 @modern-js/plugin-jarvis
依赖 #1267
dev
命令日志展示,不展示 type-check
过程信息,只展示对应错误信息 #1283
package-json
依赖,优化用户依赖大小 #1292
Can't call useContainer out of scope
错误 #1255
server.watchOptions
配置,支持配置 chokidar
文件监听规则 #1290
App.init
或者插件 init
钩子函数中通过 setHeader
和 status
设置 Response 的 Header 和 statusCode #1276
gen-release-note
命令自定义参数,支持异步函数 #1280
devcert
版本号至 v1.2.2
#1252
babel-plugin-import
支持忽略未安装的依赖 #1275
@babel/runtime
版本至 ^7.18.0
#1284
Bug Fix
Published by caohuilin over 2 years ago
Features
modern change-stauts
命令,支持查看当前分支 chagneset 状态 #1218
source.moduleScopes
行为,仅在配置时限制源代码引用路径。#1211 | DOC source.moduleScopes
config/upload
目录下 js 文件压缩策略, 忽略 .min.js
结尾的文件。#1214 | DOC config/upload
tools.webpack
配置中 addRules
、appendPlugins
、prependPlugins
方法简化 #1219 | DOC tools.webpack
farrow-http
依赖,减小包依赖体积 #1221
devcert
依赖至 v1.2.2 #1222
babel-loader
和 ts-loader
编译文件策略 #1241
modern start
命令启动时间 #1244
modern gen-release-note
命令,支持根据 changeset 自动生成 Release Note #1226
Bug Fix
.eslintrc.js
文件位置问题 #1217
applyOptionsChain
类型问题 #1224
createApp
返回组件不可直接被加载问题 #1228
tools.babel
配置中 addIncludes
工具函数类型报错问题 #1235
.prettierrc
文件配置格式化代码 #1243
./dist/storybook-static
#1237
tools.terser
类型 #1247
modern bump
命令未支持 ignore
参数 #1246
ssrByEntries[name]
存在时 SSR 未打包问题 #1249
modern.config.js
中自定义插件失败问题 #1245
babel-loader
编译未忽略 api 目录问题 #1248
Published by caohuilin over 2 years ago
Features
tools.postcss
支持通过 addPlugins
方法添加插件 1183 | DOC tools.postcss
inspect
命令,支持查看当前最终的 webpack 配置 1189 | DOC inspect 命令
tools.less
和 tools.sass
配置支持 addExcludes
方法 1187 | DOC tools.less DOC tools.sass
tools.tsLoader
配置支持 addIncludes
和 addExcludes
方法 1196 | DOC tools.tsLoader
tools.babel
配置支持 addPlugins
、addPresets
、removePlugins
、removePresets
、addIncludes
、addExcludes
方法 1200 | DOC tools.babel
successInfo
字段值自定义创建项目成功展示信息 1207 | DOC 工程方案配置
Bug Fix
Published by caohuilin over 2 years ago