https://github.com/aitoroses/vulcanize-loader
Polymers vulcanize tool loader for webpack
https://github.com/aitoroses/vulcanize-loader
Last synced: 11 months ago
JSON representation
Polymers vulcanize tool loader for webpack
- Host: GitHub
- URL: https://github.com/aitoroses/vulcanize-loader
- Owner: aitoroses
- Created: 2015-10-19T22:10:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T11:04:01.000Z (over 9 years ago)
- Last Synced: 2025-07-22T23:25:37.235Z (11 months ago)
- Language: JavaScript
- Size: 55.7 KB
- Stars: 24
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vulcanize loader for webpack
Use **html-imports** and **webcomponents** in your webpack bundle with Vulcanize (from Polymer)
> With ES6 support via babel.
## Usage
* Specify root path with **base**
* Minify javascript with `NODE_ENV=production` or query parameter **compress**.
* The module will vulcanize the file and write write the document.head to add the corresponding html-import.
``` javascript
require("vulcanize?compress=true&base=/lib!./imports.html");
// => returns i. e. "/lib/imports.html"
```
* To watch files for changes, use a `|` separated list of relative filenames
* To watch folders for changes, use a `|` separated list of relative directories
``` javascript
require("vulcanize?compress=true&base=/lib&watchFolders=./elements|./elements2&watchFiles=./elements3/a.html|./elements3/b.html!./imports.html");
// => returns i. e. "/lib/imports.html"
// rebuilds when any file in ./elements or ./elements2 changes
// rebuilds when ./elements3/a.html or ./elements3/b.html changes
```
## License
MIT (http://www.opensource.org/licenses/mit-license.php)