aitoroses / vulcanize-loader

Polymers vulcanize tool loader for webpack
24 stars 8 forks source link

How to use it in a webpack configuration ? #5

Open cdupetit opened 7 years ago

cdupetit commented 7 years ago

Hello, Can you give an example of using this loader in a webpack configuration ? In which file include the require ? How to import the html from a bower_components directory ? Thanks in advance. Regards

aitoroses commented 7 years ago

Hi @cdupetit,

An example would be to have un js file like this one:

// Require your main webcomponent file (that can be just a file filled with html imports, custom styles or whatever) require('vulcanize!./imports.html')

- src/imports.html



That should do the job, I hope it helps!
cdupetit commented 7 years ago

Thank you @aitoroses, that was the trick.

Birowsky commented 7 years ago

@aitoroses it'd be really useful to add this to readme

aitoroses commented 7 years ago

I plan to add an example folder with minimal setup projects demostrating on how to use it with react, angular2 and vanilla javascript!

I accept PR too if you want to add it to readme 😄