I have a polymer 3 app created with polymer init
There I have some custum elements. In my my-app.js
I importet the custom element js and used the element there.
Everything works but if I build the app with polymer build
the custom element js file was not generated in the build/es5-bundled/src folder
What am I doing wrong?
Asked
Active
Viewed 75 times
-1

sandermann
- 21
- 4
1 Answers
0
You have preset set to es5-bundled
- a bundled build -> the custom element is generated and written to index.html.
You'll find in index.html
something like <script crossorigin="">define(['/src/my-app/my-app.js']);</script>

Tihomir
- 124
- 1
- 11
-
I set minify to false but also there was no custom-element.js file generated – sandermann Dec 10 '18 at 13:38
-
Still, it is not minified, but is bundled, due to that `my-app.js` is inlined to `index.html`. If you don't need bundled build, you can try with `"preset":"es5-unbundled"` (`polymer.json`). (I've rectified the answer too.) – Tihomir Dec 10 '18 at 13:53
-
I have no problem with the my-app.js file. That file was generated. Also the my-view1-3. But I have a custom-element, defined in custom-element.js in the src folder and that custom-element.js file is not in the builded src folder. – sandermann Dec 11 '18 at 14:10