File tree 1 file changed +25
-1
lines changed
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 16
16
让 Taro H5 支持 [ Pre-rendering] ( https://nextjs.org/docs/basic-features/pages#pre-rendering ) 、[ SSR] ( https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props ) 和 [ ISR] ( https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration ) ,极致的首屏速度 🚀,利于 SEO 🔍。
17
17
18
18
19
- > 作为该项目的 Owner,我目前的工作不再涉及 Taro 的开发,难以投入持续的精力来维护该项目,所以正在积极寻找本插件的贡献者。如果你有兴趣,请添加微信 SharpYourMind 与我联系 。
19
+ > 作为这个项目的创建者,我现在的工作已经和 Taro 开发无关,因而无法为其持续投入必要的精力进行维护。此刻,我正在寻找对此插件感兴趣且愿意进行贡献的热心者。如果你有热情并且对本项目感兴趣,请通过添加微信号: SharpYourMind 与我取得联系 。
20
20
21
21
## 安装
22
22
@@ -182,6 +182,30 @@ class MyComponent extends Component {
182
182
+ export default withRouter(MyComponent)
183
183
```
184
184
185
+ ## 插件配置
186
+
187
+ 该插件支持以下配置项:
188
+
189
+ ``` javascript
190
+ const config = {
191
+ plugins: [
192
+ [' tarojs-plugin-platform-nextjs' , {
193
+ // 当执行 taro build --type nextjs --watch 命令后,是否需要自动执行 next dev 命令
194
+ // 默认为 true
195
+ runNextjs: true ,
196
+ // 是否启动后自动打开浏览器
197
+ // 默认为 true
198
+ browser: true ,
199
+ // 在插件编译阶段需要复制到 Next.js 中的附加文件
200
+ // 作为示例,比如你本地编写的 postcss 插件目录
201
+ extraFiles: [
202
+ ' postcss-plugins/**'
203
+ ]
204
+ }]
205
+ ]
206
+ }
207
+ ```
208
+
185
209
## Taro 组件的 React 实现
186
210
187
211
Taro 官方的 H5 组件库是基于 Stencil 框架开发,为了更好的性能和兼容性,本项目使用完全基于 React 开发的 Taro 组件库 [ @taror/components ] ( https://nervjs.github.io/tarojs-plugin-platform-nextjs/ ) 。
You can’t perform that action at this time.
0 commit comments