0.0.12 • Published 8 years ago
polymer-vue-loader v0.0.12
A loader for vue to use polymer components asynchronously and without add label
Install
npm i -D polymer-vue-loaderUsage
test: /\.vue$/,
use:[
{
loader: 'vue-loader',
options: {
loaders: {
css: ExtractTextPlugin.extract({fallback: 'vue-style-loader', use: 'css-loader'})
}
}
},
{
loader: 'polymer-vue-loader',
options: {
prefix: ['plm-cus'],
suffix: 'html',
path: resolve('src/polymer/customLabel')
}
}
],1.you have to use polymer-vue-loader with vue-loader together,and always put it in the end of the loaders array.
2.polymer-vue-loader has 3 options,as shown below:
| name | type | desc | required |
|---|---|---|---|
| path | string | the path contains polymer components | yes |
| prefix | array | your custom polymer components always should have same prefix just like 'plm-cus' | yes |
| suffix | string | your custom polymer components' file suffix,just like '.html .tpl .ejs' | no (default to .html) |
License
MIT