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

Production Build #51

Open
p4pramod opened this issue Jan 10, 2018 · 2 comments
Open

Production Build #51

p4pramod opened this issue Jan 10, 2018 · 2 comments

Comments

@p4pramod
Copy link

how do i create prod build. Currently the compiled file is quite large.

@xcatliu
Copy link
Owner

xcatliu commented Jan 11, 2018

Try uglifyjs

@p4pramod
Copy link
Author

i compiled Hello-World example with webpack by running following command

webpack webpack-complied-Script.js --progress -p

I got the following message

WARNING in webpack-complied-Script.js from UglifyJs
Condition always true [.//es3ify-loader!.//react/lib/ReactMount.js:764,0]
Condition always true [.//es3ify-loader!.//react/lib/findDOMNode.js:46,0]
Condition always true [.//es3ify-loader!.//react/lib/instantiateReactComponent.js:80,0]
Dropping unreachable code [.//es3ify-loader!.//react/lib/shouldUpdateReactComponent.js:40,0]
Condition always true [.//es3ify-loader!.//react/lib/traverseAllChildren.js:158,0]
Condition always true [.//es3ify-loader!.//es5-shim/es5-sham.js:18,0]
Dropping unreachable code [.//es3ify-loader!.//es5-shim/es5-sham.js:21,5]
Condition always true [.//es3ify-loader!.//es5-shim/es5-shim.js:18,0]
Dropping unreachable code [.//es3ify-loader!.//es5-shim/es5-shim.js:21,5]
Dropping side-effect-free statement [.//es3ify-loader!.//es5-shim/es5-shim.js:2013,0]
Dropping side-effect-free statement [.//es3ify-loader!.//es5-shim/es5-shim.js:2010,0]
Condition always true [.//es3ify-loader!.//react/lib/ReactDOMComponent.js:907,0]
Dropping side-effect-free statement [.//es3ify-loader!.//react/lib/ReactEventListener.js:72,0]
Dropping unused function handleTopLevelWithPath [.//es3ify-loader!.//react/lib/ReactEventListener.js:98,0]
Dropping unused variable DOCUMENT_FRAGMENT_NODE_TYPE [.//es3ify-loader!.//react/lib/ReactEventListener.js:26,0]

but when I run the webpack-complied-Script.js in IE 8 mode in internet explorer it did not worked.

I got the following error

JavaScript critical error at line 1, column 15160 in http://localhost:49264/src/webpack-complied-Script.js\n\nSCRIPT1010: Expected identifier

error is thrown at follwing line

Symbol&&Symbol.for&&Symbol.for

pls help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants