0
votes

I'm trying to create custom polymer element using polymer seed. This element is dependent of pdf.js, which I include in the beginning of my element:

<link rel="import" href="../polymer/polymer.html">
<script src="../pdfjs-dist/build/pdf.js"/>

<dom-module id="my-element">

...

When I run polyserve I got an error:

hydrolysis-analyzer.html:104 Failed to load source at:
http://localhost:8080/components/pdf-element/pdf-element.html ... 
Error parsing script in http://localhost:8080/components/pdfjs-dist/build/pdf.js at 3:1(…)
SyntaxError: Unexpected token <

Is it me who is putting dependency wrong? (How should I manage element's dependency properly?) Or there is something wrong with configuration/version of seed project? Just in case it could be related I'm using iron-component-page version 1.1.5)

1

1 Answers

0
votes

Ooops... The problem was in the script tag, instead of

<script src="../pdfjs-dist/build/pdf.js"/>

should be:

<script src="../pdfjs-dist/build/pdf.js"></script