2.2.1 • Published 4 years ago
template-pic-loader v2.2.1
TemplatePicLoader
If You Has Any Bugs To Tell Author, Please Jump To Github
If This Loader Is Helpful For You, Please GIVE ME A STAR
FEATURE
- solve the template link source like hbs, html, with Webpack ,
- Solve the like pictures source request in up-template which request like tags named 'img' or 'link?rel=shorcut icon', for Webpack
- It depends on url-loader
TODO
Support hash
HOW TO USE
Template
< link rel="shortcut icon" href="xxxxxx" >
< img src="__imgs/4.jpg" >
...
Webpack Config
rules: [
...,
{
test: /\.hbs$/,
exclude: /node_modules/,
use: [
{
loader: 'template-pic-loader',
options: {
condition: [ 'link?rel=icon:href', 'img:src' ],
extract: true,
filename: '[name].[ext]',
minimize: true
}
}
]
},
...
]
Options
filename : String
Output file information.
condition Array
Tell loader which tags and tag's attr need to bundle,For details, please check up-demo.
extract: Boolean Extract source based on filename or not.
minimize: Boolean Minimize the source or not.
minopt: Object Work when minimize is true, like minimize package options, you can check it.
2.2.1
4 years ago
2.1.1
5 years ago
2.1.0
5 years ago
2.0.3
5 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago