Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
feat: web端支持自定义模板 (#1115)
Browse files Browse the repository at this point in the history
* feat: web端支持自定义模板

* 默认优先用public下的Index.html

* 删除无用type

* chore: 测试用例和文档补充

* fix: 删除无用console和注释

* test: update test

Co-authored-by: TongZ <[email protected]>
Co-authored-by: Caihuanyu <[email protected]>
  • Loading branch information
3 people committed Jul 9, 2020
1 parent 901cc2d commit c602637
Show file tree
Hide file tree
Showing 14 changed files with 517 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/guide/basic/public.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ export default () => {
return <Image src="/images/icon.png" />;
};
```

> 2.7.0 开始支持
在项目根目录下创建 `public/index.html` 文件

你可以将 web 端 `默认html模板文件` 替换成你自定义的 `html模板文件`,remax 将在 `id=remax-app` 的元素中渲染
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import runTest from './helpers/runTest';
import { Platform } from '@remax/types';

describe('build custom html template app', () => {
runTest('customHtmlTemplate', Platform.web);
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

1 comment on commit c602637

@vercel
Copy link

@vercel vercel bot commented on c602637 Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.