![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
midway-vite-view
Advanced tools
Readme
midway+vite 服务端渲染和客户端渲染组件
###使用实例 https://github.com/yuntian001/midway-vite-view/tree/main/example
$ npm require midway-vite-view -d
view 文件夹下创建放入对应视图文件
修改 vite.config.js root 参数为process.cwd()+'/view'
midway configuration.ts中引入视图文件
import * as viteView from 'midway-vite-view';//引入view组件
@Configuration({
imports: [
//其余代码不变
viteView, //导入view组件
],
})
//其余代码不变
view: { //midwayjs 视图配置 说明参考 https://midwayjs.org/docs/extensions/render
defaultViewEngine: 'viteView',
},
viteView: { midway-vite-view 配置配置详细说明见下方
clientIndex: ['index/index.html', 'admin/index.html'],
entryServers: [
'index/src/entry-server.js',
'admin/src/entry-server.js',
],
},
//服务端渲染
return this.ctx.render('index/index.html', {
entry: 'index/src/entry-server.js',
});
//客户端渲染
return this.ctx.render('index/index.html');
"build": "midway-bin build -c && vite-view build"
配置项 | 类型 | 是否必须 | 说明 |
---|---|---|---|
prod | boolean | 否 | 是否是发布环境 如果不传用运行环境是否为prod以区分 |
clientIndex | array | 是 | 客户端渲染index.html列表 路径相对于view文件夹 |
entryServers | array | 否 | 服务端渲染entry-server.js地址 路径相对于view文件夹 |
传参方式为 vite-view build --type 1
参数项 | 默认值 | 说明 |
---|---|---|
type | 1 | 构建方式:1=根据配置文件自动构建,2=自动寻找viewDir文件夹下的index.html和entry-server.js进行构建 |
config | src/config | midway配置文件夹/配置文件 |
outDir | public | 编译输出目录 |
viteConfigFile | 命令根目录 vite.config.js | vite 配置文件 |
viewDir | view | 视图文件夹 仅在type2模式下使用 |
FAQs
midway vite ssr view vue react, midway 的 vite 服务端渲染和客户端渲染组件,支持vue3 react,服务端渲染失败后会自动执行客户端渲染。 Midway's Vite server rendering and client rendering components support vue3 React, Client rendering is automatically performed when server rendering fails。
The npm package midway-vite-view receives a total of 1 weekly downloads. As such, midway-vite-view popularity was classified as not popular.
We found that midway-vite-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.