Open vedtam opened 7 years ago
Hi @vedtam, it looks that it's an issue with vulcanize itself and how webcomponents are meant to work.
Apparently the parser doesn't allow to use import/export statements in code. And that makes sense since it's meant to be used with html-imports.
Even if you put a require
statement, it wont be bundled by vulcanize.
You should use <script src="node_modules/apollo-client/....."></script>
instead of requiring things like you'd do with webpack.
You could also use require.js or system.js or something like that too.
Thanks @aitoroses for the clarification! I wasn't aware about this limitation.
Hi,
When I run this in my main.js (set entry in webpack.config.js):
require("vulcanize?compress=true&base=/dist!./components/home/polymer-home.html");
I get:
At line 31 in my polymer-home.js I have: