https://github.com/hxfdarling/html-inline-assets-loader
auto compile relative css/js/image file in html file
https://github.com/hxfdarling/html-inline-assets-loader
html html-webpack-plugin inline-css inline-javascript loader webpack
Last synced: 3 months ago
JSON representation
auto compile relative css/js/image file in html file
- Host: GitHub
- URL: https://github.com/hxfdarling/html-inline-assets-loader
- Owner: hxfdarling
- License: mit
- Created: 2018-11-04T14:33:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T07:33:10.000Z (about 6 years ago)
- Last Synced: 2025-02-19T13:46:44.691Z (3 months ago)
- Topics: html, html-webpack-plugin, inline-css, inline-javascript, loader, webpack
- Language: JavaScript
- Homepage:
- Size: 181 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# html-inline-assets-loader
自动处理 html 文件中的相对引用 css/js/html 资源 文件,直接内联到 html 文件中,或者自动编译并拷贝到 dist 目录
# useage
```js
const configureHtmlLoader = () => {
return {
test: /\.(html|njk|nunjucks)$/,
use: [
resolve('html-loader'),
// 自动处理html中的相对路径引用 css/js/html文件
resolve('html-inline-assets-loader'),
{
loader: resolve('nunjucks-html-loader'),
options: {
// Other super important. This will be the base
// directory in which webpack is going to find
// the layout and any other file index.njk is calling.
searchPaths: ['./src'],
},
},
],
};
};
```HTML file
```html
```