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 Error #14

Closed
rajanmagar opened this issue May 28, 2018 · 7 comments
Closed

Production Build Error #14

rajanmagar opened this issue May 28, 2018 · 7 comments

Comments

@rajanmagar
Copy link

Failed to modify the code from this file

./node_modules/@polymer/lit-element/lit-elelment.js:12

@pshihn
Copy link
Contributor

pshihn commented May 28, 2018

Sorry don't know what build you're running and why it's trying to modify that file.

@shenzekun
Copy link

shenzekun commented May 29, 2018

same problem! I use create-react-app create a program and use wired-elements,but when I run yarn bulid,appear this(I didn't modify ./node_modules//lit-elelment.js this file)
image

@pshihn
Copy link
Contributor

pshihn commented May 30, 2018

This is likely because the target of the build is set to ES5. There may be other solutions out there. Don't think it is specific to wired-elements. But anyone using lit-element

https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

@bencoullie
Copy link

Same problem here 👍

@sashahavia
Copy link

Same here. Did anyone find the solution?

@pshihn
Copy link
Contributor

pshihn commented Sep 29, 2018

The easiest work around is the use the bundled version in your app

<script src="https://unpkg.com/[email protected]/dist/wired-elements.bundled.min.js"></script>

@pshihn
Copy link
Contributor

pshihn commented Apr 20, 2019

This demo CodeSandbox shows usage of wired-elements in create-react-app.
https://codesandbox.io/embed/xrll5wyl8w
(uses the latest wired-elements build)

@pshihn pshihn closed this as completed Apr 20, 2019
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

5 participants