twig-html-loader:Twig到Webpack的html加载器

时间:2024-05-26 03:13:13
【文件属性】:

文件名称:twig-html-loader:Twig到Webpack的html加载器

文件大小:20KB

文件格式:ZIP

更新时间:2024-05-26 03:13:13

html twig webpack loader compile

twig-html-loader Webpack的加载程序,可将模板编译为html字符串。 入门 首先,您需要安装twig-html-loader : npm install twig-html-loader --save-dev 将树枝模板添加到您的源: var html = require ( './index.twig' ) ; 然后将加载程序添加到您的webpack配置中。 例如: module . exports = { // ... rules : [ // ... { test : / \. twig $ / , use : [ 'raw-loader' , { loader : 'twig-html-loader' , options : {


【文件预览】:
twig-html-loader-master
----index.js(3KB)
----package.json(880B)
----LICENSE(1KB)
----package-lock.json(54KB)
----.eslintrc.js(134B)
----.gitignore(18B)
----README.md(6KB)
----.jshintrc(23B)

网友评论