Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge e2e logic for WebRenderer #3839

Closed
wants to merge 459 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
459 commits
Select commit Hold shift + click to select a range
84d8ecd
chore(web-renderer): update example
youchant Mar 22, 2022
2a9b8f0
refactor(module-name): remove static moudle name
pba-cra Mar 22, 2022
81ac5e7
refactor(module-name): remove static moudle name
pba-cra Mar 22, 2022
9be0f31
docs(readme-cn): add README.zh_CN.md
pba-cra Mar 22, 2022
54daa9f
fix(lint): fix lint warn or error
pba-cra Mar 22, 2022
466ce81
fix(network-module): response.header assign error
pba-cra Mar 23, 2022
5822371
fix(list-view): delay list-view endBatch()
pba-cra Mar 23, 2022
5ac3222
fix(list-view): fix uimoudle delete child not all when child is list
pba-cra Mar 23, 2022
ef13e81
docs(example): add hippy-web-render example
pba-cra Mar 23, 2022
909f0bf
fix(web-renderer): 'network-module' response field error
youchant Mar 25, 2022
7a67b17
chore(web-renderer): update example
youchant Mar 25, 2022
9fbfbdf
fix(web-renderer): change engine create options
youchant Mar 25, 2022
2e54cb2
chore(web-renderer): update demo
youchant Mar 25, 2022
6ada220
style(text-view): rename text-view component
pba-cra Mar 29, 2022
886832a
refactor(animation-module): delete no use moduleName
pba-cra Mar 29, 2022
73e2ef0
chore(web-renderer): add license header
youchant Mar 30, 2022
be57227
feat(package.json): change source
pba-cra Mar 30, 2022
25ed659
feat(tintColor): image support tintColor props
pba-cra Mar 31, 2022
9983a86
fix(opacity): fix opacity style error
pba-cra Mar 31, 2022
c20092e
feat(background): support backgroundImage and backgroundSize
pba-cra Apr 8, 2022
dcc97b0
feat(listview): list-view support rowShouldSticky
pba-cra Apr 8, 2022
4c67c11
fix(refreshWrapper): fix refreshWrapper pull logic error
pba-cra Apr 24, 2022
0fc0118
fix(websocket): fix websocket error
pba-cra Apr 24, 2022
f234a96
fix(lint): fix lint error
pba-cra Apr 24, 2022
d5fd077
fix(netinfo): fix netinfo getCurrentConnectivity error
pba-cra Apr 25, 2022
b111f92
fix(animation): fix animation start event no tigger
pba-cra Apr 27, 2022
5e61f8c
fix(modal): fix modal animation error
pba-cra Apr 27, 2022
2db624f
feat(root): support mount to exiting dom
pba-cra Apr 28, 2022
73bd84f
fix(image): fix image z-index error
pba-cra May 5, 2022
bb91aed
fix(web-renderer): typescript type error
youchant May 6, 2022
94fac32
fix(list): fix list-item height calculate error
pba-cra May 6, 2022
67c9a7e
fix(listview): fix listview can't scroll on vue
pba-cra May 6, 2022
12c49cb
fix(listview): fix listview scrollToIndex error
pba-cra May 6, 2022
6643c65
fix(list): fix list-view delete error
pba-cra May 6, 2022
8ae7096
fix(hippy-view): fix onTouch event error
pba-cra May 6, 2022
42e3fe2
fix(refresh): fix beforeRemove() error
pba-cra May 6, 2022
d8cc789
feat(web-renderer): support turbo module
pba-cra Jun 2, 2022
f7e9823
fix(error): text-view animatin-module storage-module error fix
pba-cra May 10, 2022
0ffb37b
fix(localStorage): fix localStorage invoke error
pba-cra May 10, 2022
2f2e0d6
fix(scale): fix transform scale error
pba-cra May 11, 2022
c9ec0ac
fix(ImageLoaderModule): fix ImageLoader name error
pba-cra May 11, 2022
676118d
fix(listview): change list-view sticky row zIndex
pba-cra May 11, 2022
d387b92
feat(list-view): change list-view sticky row implement
pba-cra May 12, 2022
76aac9a
fix(web-renderer): engine modules init
youchant May 13, 2022
7748943
fix(list-view): remove no use code
pba-cra May 12, 2022
6093aa8
refactor(list-view): change last one scroll-event logic
pba-cra May 16, 2022
772b093
fix(font-size): fix font-size and line-height inconsistent
pba-cra May 16, 2022
d678b86
feat(linearGradient): support linearGradient
pba-cra May 16, 2022
e190ba6
fix(linear-gradient): fix linear-gradient error
pba-cra May 18, 2022
a0aab45
chore(backAndroid): close backAndroid
pba-cra May 18, 2022
2d302f1
chore(web-renderer): fix lint error
youchant May 23, 2022
33781b0
chore(remove): remove no use files
pba-cra May 23, 2022
10c46b7
chore(log): remove no use log
pba-cra May 18, 2022
042f281
chore(style): update inline style
pba-cra May 23, 2022
6d67108
chore(lint): lint problem fix
pba-cra May 23, 2022
aa0c3f0
chore(web-render): remove no use
pba-cra May 23, 2022
8a62c77
fix(web-renderer): engine start support params is null
youchant May 23, 2022
35808af
feat(readme): update hippy-web-renderer readme
pba-cra Jun 1, 2022
a8fb6f3
docs(web): add web-renderer md
pba-cra Jun 1, 2022
9d759cd
docs(web): add web-renderer md
pba-cra Jun 2, 2022
5a74e39
refactor(size): update screen size
pba-cra Jun 2, 2022
b6c014a
chore(demo): remove no use demo
pba-cra Jun 2, 2022
6157ce8
chore(rename): rename web-renderer
pba-cra Jun 2, 2022
101086b
Merge branch 'Tencent:master' into master
pba-cra Jun 7, 2022
e08d8c8
docs(web-renderer): update web/integration doc
youchant Jun 7, 2022
6053182
Merge branch 'master' into main
zoomchan-cxj Jun 8, 2022
370a8b6
chore(lint): lint problem fix
pba-cra May 23, 2022
cc390bc
fix(list): fix list scrollEnabled error
pba-cra Jun 9, 2022
6f709b8
Merge branch 'Tencent:master' into main
pba-cra Jun 10, 2022
88434d6
Merge branch 'master' into main
zoomchan-cxj Jun 17, 2022
9c37938
feat(contentContainerStyle): scrollView support contentContainerStyle
pba-cra Jun 20, 2022
4129f32
fix(list): fix list scrollEnabled error
pba-cra Jun 9, 2022
159bb32
feat(contentContainerStyle): scrollView support contentContainerStyle
pba-cra Jun 20, 2022
eedb2b0
docs(web-renderer): web-renderer add support detail
pba-cra Jun 20, 2022
c322148
Merge branch 'master' into main
zoomchan-cxj Jun 22, 2022
12daea6
Merge branch 'master' into main
zoomchan-cxj Jun 22, 2022
1cd658b
feat(hippy-react-demo): Support for hippy web renderer
crazyming9528 Jun 23, 2022
db6c606
refactor(hippy-react-demo): Remove unnecessary code
crazyming9528 Jun 23, 2022
4229873
refactor(hippy-react-demo): update package version 0.1.0
crazyming9528 Jun 23, 2022
1648b89
refactor(hippy-react-demo): update package and comments
crazyming9528 Jun 23, 2022
17ce8e0
fix(animation): fix animationEndEvent error
pba-cra Jun 24, 2022
b8d485e
Merge branch 'master' into main
zoomchan-cxj Jun 27, 2022
1227540
feat(onLayout): onLayout change first trigger time
pba-cra Jun 27, 2022
031c705
feat(AnimationSet): support AnimationSet
pba-cra Jun 27, 2022
35d95f9
fix(scrollEnabled): fix scrollEnabled prop name error
pba-cra Jun 27, 2022
1d1e508
fix(animation-module): fix animationSet error
pba-cra Jun 27, 2022
f0d46bb
style(lint): fix lint warning
pba-cra Jun 27, 2022
3f61dc9
style(lint): fix lint warning
pba-cra Jun 27, 2022
ff404b7
fix(scrollEnabled): fix scrollEnabled prop name error
pba-cra Jun 27, 2022
9b75b73
style(build): update web-renderer build config and Copyright
pba-cra Jun 27, 2022
d082324
style(readme): remove no use code
pba-cra Jun 28, 2022
ba69b2f
Merge branch 'master' into main
zoomchan-cxj Jun 28, 2022
1ac36fe
Merge branch 'master' into main
zoomchan-cxj Jun 29, 2022
df0c094
fix(animation): fix start animation state error
pba-cra Jun 29, 2022
ae026ac
docs(web-renderer): update web-renderer doc
pba-cra Jun 29, 2022
085453d
docs(web-renderer): update web-renderer docs
pba-cra Jun 29, 2022
836dd11
docs(web-renderer): change custome-module.md some info
pba-cra Jun 29, 2022
cf8a258
docs(web-renderer): update hippy-vue info about web-renderer
pba-cra Jun 29, 2022
38da4cf
Merge branch 'master' into main
zoomchan-cxj Jun 29, 2022
7ca220d
fix(web-renderer): fix code review suggestion
pba-cra Jun 30, 2022
fc2ddf0
Merge branch 'main' into feature/react-demo
crazyming9528 Jun 30, 2022
9bf4c47
feat(hippy-vue-demo): Support for hippy web renderer
crazyming9528 Jul 4, 2022
9da1463
Merge pull request #2 from hippy-contrib/feature/vue-demo
crazyming9528 Jul 5, 2022
cbe51bb
Merge pull request #1 from hippy-contrib/feature/react-demo
crazyming9528 Jul 5, 2022
f6eed9c
docs(web-renderer): add web-renderer docs
Jul 11, 2022
a1f00f1
chore(hippy-react-demo): Merge hippy web renderer of react demo
crazyming9528 Jul 11, 2022
fa618bc
Merge branch 'feature/vue-demo' into feature/web-renderer-preview
crazyming9528 Jul 11, 2022
3146cb0
Merge branch 'Tencent:master' into feature/web-renderer-preview
pba-cra Jul 12, 2022
305d903
refactor(lint): fix lint
pba-cra Jul 12, 2022
ad4975a
refactor(lint): fix code review error
Jul 11, 2022
188dac7
style(lint): fix lint error
Jul 12, 2022
372e4d2
Merge remote-tracking branch 'remotes/origin/feature/main'
Jul 12, 2022
5221f55
Merge branch 'main' into oa
pba-cra Jul 14, 2022
d90f670
refactor(update): update npm registry
pba-cra Jul 14, 2022
5c38f85
fix(animationCssProperty): fix animation css property error with camel
pba-cra Jul 14, 2022
a14ddb8
fix(hippyAnimation): fix animation duplicate
pba-cra Jul 14, 2022
9506bad
feat(animation): support one animation run more node
pba-cra Jul 15, 2022
cd396c5
refactor(style): remove no use code
pba-cra Jul 29, 2022
be8b8b6
feat(animation): support one animation run more node
pba-cra Jul 29, 2022
f5f3762
Merge remote-tracking branch 'remotes/origin/web-renderer-pre'
pba-cra Jul 29, 2022
6f46507
Merge branch 'feature/main'
pba-cra Jul 29, 2022
61696ff
feat(example): add debug example
pba-cra Aug 4, 2022
36cb3e0
feat(tintColor): update img tintColor logic
pba-cra Aug 4, 2022
dbe3095
Merge remote-tracking branch 'origin/main' into oa
pba-cra Aug 4, 2022
69a7d39
Merge remote-tracking branch 'origin/main' into oa
pba-cra Aug 4, 2022
d933092
Merge branch 'Tencent:master' into main
pba-cra Aug 4, 2022
fb99920
version(0.1.10)
pba-cra Aug 4, 2022
9854b67
refactor(web-renderer): change package.json
pba-cra Aug 5, 2022
a5a1eed
feat(update): example update
pba-cra Aug 12, 2022
23b2e65
refactor(log): remove console.log and fix bug
pba-cra Aug 12, 2022
4367f10
feat(web-renderer): add console.reportUncaughtException and global un…
youchant Aug 12, 2022
3b2d887
feat(web-renderer): add console.reportUncaughtException and global un…
youchant Aug 12, 2022
de47d3c
feat(warn): add warn limit
pba-cra Aug 12, 2022
9147705
refactor(license): change web-renderer license time
pba-cra Aug 12, 2022
13f7508
refactor(log): remove console.log and fix bug
pba-cra Aug 12, 2022
ab14bec
feat(warn): add warn limit
pba-cra Aug 12, 2022
15b0ea7
version(0.0.3)
pba-cra Aug 12, 2022
0390ddc
feat(img): img border compatible
pba-cra Sep 2, 2022
286b623
feat(stackContext): support no stack context logic
pba-cra Sep 2, 2022
556dda3
version(0.1.11)
pba-cra Sep 2, 2022
b4162eb
fix(sticky): fix listView sticky failed
pba-cra Sep 7, 2022
9eb5fad
fix(text): fix text numberOfLines error Web-Renderer
pba-cra Sep 7, 2022
1bbc4a4
version(0.1.12)
pba-cra Sep 7, 2022
b111bdf
Merge branch 'Tencent:master' into main
pba-cra Sep 7, 2022
f969360
fix(style): WebRenderer fix position set error
pba-cra Sep 7, 2022
6a26988
version(0.0.13)
pba-cra Sep 7, 2022
fb1dfb1
refactor(ignore): add npm ignore
pba-cra Sep 7, 2022
0374271
version(0.1.14)
pba-cra Sep 7, 2022
104c8fa
refactor(CopyRight): change time to 2022
pba-cra Sep 7, 2022
bc2f78c
fix(image): fix web-renderer tint color lineHeight error
pba-cra Sep 9, 2022
af2370e
version(0.0.15)
pba-cra Sep 9, 2022
b927f76
fix(stack): web-renderer fix stack context error
pba-cra Sep 15, 2022
80d583d
Merge remote-tracking branch 'origin/feature/main'
pba-cra Oct 21, 2022
cda1874
feat(img): img border compatible
pba-cra Sep 2, 2022
6c8dba3
feat(stackContext): support no stack context logic
pba-cra Sep 2, 2022
e87a913
fix(sticky): fix listView sticky failed
pba-cra Sep 7, 2022
785484e
fix(text): fix text numberOfLines error Web-Renderer
pba-cra Sep 7, 2022
2cac464
fix(style): WebRenderer fix position set error
pba-cra Sep 7, 2022
82be2c6
fix(image): fix web-renderer tint color lineHeight error
pba-cra Sep 9, 2022
ca9f6e9
fix(stack): web-renderer fix stack context error
pba-cra Sep 15, 2022
61a39fb
Merge remote-tracking branch 'origin/feature/main' into oa
pba-cra Oct 21, 2022
5c3a227
Merge branch 'main' into oa
pba-cra Oct 21, 2022
9b9e7f9
Merge branch 'main' into oa
pba-cra Oct 21, 2022
b5288b5
test(e2e): WebRenderer e2e
pba-cra Oct 27, 2022
ae9fb8a
test(e2e): WebRenderer add test case
pba-cra Oct 27, 2022
3ac6adf
refactor(webrenderer): code refactoring improve performance
pba-cra Oct 31, 2022
4be00b5
feat(textanimation): webrenderer support text color animtaion
pba-cra Oct 31, 2022
e0beb05
refactor(example): remove no use code
pba-cra Oct 31, 2022
4978f5b
feat(animation): webrenderer support animation cubicBezier
pba-cra Oct 31, 2022
c27ce69
test(e2e): add test export generate logic
pba-cra Oct 31, 2022
cedaba3
test(webrenderer): add test gitignore
pba-cra Oct 31, 2022
3b2b368
test(webrenderer): add test gitignore
pba-cra Oct 31, 2022
4822072
test(addcase): add test case and license
pba-cra Nov 2, 2022
bed9485
fix(listview): fix listview insert item position error
pba-cra Dec 6, 2022
9b884ff
fix(image): fix image load event params error
pba-cra Apr 19, 2023
f84c38c
version(0.1.16)
pba-cra Apr 19, 2023
a1d3939
fix(zIndex): fix stack context error
pba-cra Apr 19, 2023
2efb2fe
fix(img): fix img container error
pba-cra Jun 26, 2023
3bcd456
fix(webrenderer): fix ViewPager setPage invoke loop error
pba-cra Jun 26, 2023
9e17ac3
fix(image): fix overflow default logic error
pba-cra Jun 27, 2023
6f2d453
feat(fontSize): webrenderer support fontSize < 12px
pba-cra Jun 27, 2023
07e2c96
fix(webrenderer): fix ViewPager overflow logic error
pba-cra Jun 27, 2023
7efbe89
fix(webrenderer): fix Image vertical-align error
pba-cra Jun 27, 2023
9328bdc
fix(webrenderer): fix animation not check refNode
pba-cra Jun 28, 2023
77d693b
fix(webrenderer): fix XXXAssociate function check logic
pba-cra Jun 28, 2023
5d19b4d
fix(webrenderer): fix image size not set error
pba-cra Jun 28, 2023
b24dace
fix(webrenderer): fix modal zindex logic error
pba-cra Jun 28, 2023
ad8e09a
refactor(webrenderer): refactor code logic
pba-cra Jun 28, 2023
6ba5ce3
fix(webrenderer): fix update logic error
pba-cra Jun 28, 2023
b4e02a8
version(0.1.19)
pba-cra Jun 28, 2023
0e40769
feat(webrenderer): support transimtData to Dom
pba-cra Jul 3, 2023
e622e39
version(0.1.20)
pba-cra Jul 3, 2023
c5a4aed
fix(webrenderer): fix modal size error
pba-cra Jul 4, 2023
dcf170d
version(0.1.21)
pba-cra Jul 4, 2023
7d21dae
refactor(webrenderer): change support config global prop
pba-cra Jul 5, 2023
30d0de4
version(0.1.22)
pba-cra Jul 5, 2023
9bdebb2
fix(webrenderer): fix list-view overflowxy error
pba-cra Jul 7, 2023
1bba1e3
fix(webrenderer): fix text-view lineHeight logic
pba-cra Jul 7, 2023
9f0cb73
version(0.1.23)
pba-cra Jul 7, 2023
c01d0b5
fix(webrenderer): fix listviewitem overflow not hidden
pba-cra Jul 11, 2023
b405ca9
version(0.1.24)
pba-cra Jul 11, 2023
9440bf1
refactor(webrenderer): change fontsize scale logic
pba-cra Jul 11, 2023
5643adf
version(0.1.25)
pba-cra Jul 11, 2023
7e014e0
refactor(webrenderer): chagne fontsize < 12 use zoom
pba-cra Jul 11, 2023
ada1d1f
version(0.1.26)
pba-cra Jul 11, 2023
61a626d
fix(webrenderer): fix fontSize < 12 zoom logic && virtualList error
pba-cra Jul 12, 2023
f550fd7
version(0.1.27)
pba-cra Jul 12, 2023
9e7e021
fix(webrenderer): fix ios fontSize<12 error
pba-cra Jul 12, 2023
da2cbda
version(0.1.28)
pba-cra Jul 12, 2023
bf37b28
fix(webrenderer): update font vertical-align
pba-cra Jul 13, 2023
f570d3a
version(0.1.29)
pba-cra Jul 13, 2023
5c31c40
fix(webrenderer): ios render filter lose
pba-cra Jul 14, 2023
b3eb72e
version(0.1.30)
pba-cra Jul 14, 2023
ac3e6ab
fix(webrenderer): img tiny faile on ios error
pba-cra Jul 17, 2023
56857a4
version(0.1.31)
pba-cra Jul 17, 2023
e6f3eb5
fix(webrenderer): img tiny listener remove on destory
pba-cra Jul 17, 2023
3a4dd9b
version(0.1.32)
pba-cra Jul 17, 2023
df822c5
fix(webrenderer): fix customData config function
pba-cra Jul 18, 2023
2b03b45
version(0.1.33)
pba-cra Jul 18, 2023
fc1634b
fix(webrenderer): image resizeMode center withcontain
pba-cra Jul 18, 2023
f29ef36
version(0.1.34)
pba-cra Jul 18, 2023
3faade4
fix(webrenderer): data associate return error
pba-cra Jul 21, 2023
6f8ca0a
version(0.1.35)
pba-cra Jul 21, 2023
2cdcaea
fix(webrenderer): ios 11 zindex render error
pba-cra Jul 24, 2023
fc561a5
version(0.1.36)
pba-cra Jul 24, 2023
4a8e897
fix(webrenderer): fix listview ios14.1 scroll error
pba-cra Jul 24, 2023
cb9c329
version(0.1.37)
pba-cra Jul 24, 2023
b92d641
fix(webrenderer): fix zindex on ios-12
pba-cra Jul 31, 2023
d885737
version(0.1.38)
pba-cra Jul 31, 2023
1dc6f05
fix(webrenderer): fix ios <12 zindex error
pba-cra Aug 1, 2023
12c57a4
version(0.1.39)
pba-cra Aug 1, 2023
eb0a10b
refactor(webrenderer): fix ios == 12 error
pba-cra Aug 1, 2023
181e07d
version(0.1.40)
pba-cra Aug 1, 2023
244798a
refactor(webrenderer): fix android text logic
pba-cra Aug 1, 2023
9d29a91
version(0.1.41)
pba-cra Aug 1, 2023
e1a68d0
fix(ios): ios bounce
pba-cra Aug 8, 2023
c57ba95
version(0.1.42)
pba-cra Aug 8, 2023
2076ffe
fix(bounce): fix ios bounce
pba-cra Aug 8, 2023
4d1fbfa
version(0.1.43)
pba-cra Aug 8, 2023
a357954
fix(scrollView): fix when parent flex 1, size is indefinite, scrollvi…
pba-cra Nov 2, 2023
d7d3081
version(0.1.44)
pba-cra Nov 2, 2023
5921fff
fix(animation): animatin play and rotate compatibility error
pba-cra Nov 3, 2023
1778b6f
feat(uimanagermodule): add getBoundingClientRect api
pba-cra Nov 3, 2023
ceac03b
Revert "fix(bounce): fix ios bounce"
pba-cra Nov 27, 2023
83c0782
fix(text): default stylt not support break and whiteSpace
pba-cra Nov 27, 2023
8a385f1
fix: console re define error
pba-cra Dec 6, 2023
d7352d6
version(0.1.47)
pba-cra Dec 6, 2023
4339a57
Merge branch 'master' of https://github.com/Tencent/Hippy
pba-cra Apr 30, 2024
6df08d4
refactor: merge e2e and commit
pba-cra Apr 30, 2024
f769406
Merge branch 'master' into feature/e2e-web-renderer
pba-cra Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .husky/commit-msg

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/post-checkout

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/post-commit

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/post-merge

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-push

This file was deleted.

113 changes: 113 additions & 0 deletions examples/hippy-react-demo/scripts/hippy-webpack.web.render.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const HippyDynamicImportPlugin = require('@hippy/hippy-dynamic-import-plugin');
const ReactRefreshWebpackPlugin = require('@hippy/hippy-react-refresh-webpack-plugin');
const pkg = require('../package.json');

const platform = 'web';

module.exports = {
mode: 'development',
bail: true,
devServer: {
port: 3000,
hot: true,
liveReload: true,
},
devtool: 'source-map',
entry: {
index: ['regenerator-runtime', path.resolve(pkg.web)],
},
output: {
// filename: `[name].${platform}.js`,
filename: 'index.bundle.js',
path: path.resolve(`./dist/${platform}/`),
strictModuleExceptionHandling: true,
globalObject: '(0, eval)("this")',
},
plugins: [
new webpack.NamedModulesPlugin(),
new HtmlWebpackPlugin({
inject: true,
scriptLoading: 'blocking',
template: path.resolve('./public/index.html'),
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
__PLATFORM__: JSON.stringify(platform),
}),
new CaseSensitivePathsPlugin(),
new HippyDynamicImportPlugin(),
new ReactRefreshWebpackPlugin({
overlay: false,
}),
],
module: {
rules: [
{
test: /\.(jsx|ts|tsx|js)$/,
use: [
{
loader: 'babel-loader',
options: {
sourceType: 'unambiguous',
presets: [
'@babel/preset-react',
[
'@babel/preset-env',
{
targets: {
chrome: 57,
ios: 8,
},
},
],
],
plugins: [
['@babel/plugin-proposal-class-properties'],
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-transform-runtime', { regenerator: true }],
require.resolve('react-refresh/babel'),
],
},
},
],
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/',
},
}],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
modules: [path.resolve(__dirname, '../node_modules')],
alias: (() => {
const aliases = {};
// If hippy-react was built exist then make a alias
// Remove the section if you don't use it
const hippyReactPath = path.resolve(__dirname, '../../../packages/hippy-react');
if (fs.existsSync(path.resolve(hippyReactPath, 'dist/index.js'))) {
console.warn(`* Using the @hippy/react in ${hippyReactPath}`);
aliases['@hippy/react'] = hippyReactPath;
} else {
console.warn('* Using the @hippy/react defined in package.json');
}

return aliases;
})(),
},
};
86 changes: 86 additions & 0 deletions examples/hippy-react-demo/scripts/hippy-webpack.web.render.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const pkg = require('../package.json');

const platform = 'web';

module.exports = {
mode: 'production',
bail: true,
entry: {
index: ['regenerator-runtime', path.resolve(pkg.web)],
},
output: {
filename: '[name].[contenthash:8].js',
path: path.resolve(`./dist/${platform}/`),
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production'),
__PLATFORM__: JSON.stringify(platform),
}),
new HtmlWebpackPlugin({
inject: true,
scriptLoading: 'blocking',
template: path.resolve('./public/index.html'),
}),
new MiniCssExtractPlugin({
filename: '[name].[hash].css',
}),
new CaseSensitivePathsPlugin(),
],
module: {
rules: [
{
test: /\.(jsx|ts|tsx|js)$/,
use: [
{
loader: 'babel-loader',
options: {
sourceType: 'unambiguous',
presets: [
'@babel/preset-react',
[
'@babel/preset-env',
{
targets: {
chrome: 57,
ios: 8,
},
},
],
],
plugins: [
['@babel/plugin-proposal-class-properties'],
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-transform-runtime', { regenerator: true }],
],
},
},
],
},
{
test: /\.(png|jpe?g|gif)$/i,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/',
},
}],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
modules: [path.resolve(__dirname, '../node_modules')],
},
};
Loading
Loading