webpack-MultiplePage
webpack-MultiplePage copied to clipboard
如果是可继承类的模板呢?
这种inject body和script标记的动态inject方式就不适用了吧? 因为nunjucks可以继承,一般头和公共部份都通过extends方式实现。即每个模板页有可能这个样子:
{% extends "../../layout/layout.tpl" %}
{% block content %}
No comments yet.
{% endif %}请问如果是这种没有script和body标签的。该如何处理inject问题呢?
根据我个人的理解,是不太容易做到的,除非有这样的插件可以处理。文中使用的html-webpack-plugin本身就是只针对类html结构的一个插件。
$ npm run build
[email protected] build D:\work\webpack\webpack-MultiplePage-master rm -rf public/* views/* && NODE_ENV=production webpack --progress --hide-modules
'NODE_ENV' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò »òÅú´¦ÀíÎļþ¡£
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: rm -rf public/* views/* && NODE_ENV=production webpack --progress --hide-modules
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'rm -rf public/* views/* && NODE_ENV=production webpack --progress --hide-modules'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webpack-f2e package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rm -rf public/* views/* && NODE_ENV=production webpack --progress --hide-modules
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs webpack-f2e
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls webpack-f2e
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! D:\work\webpack\webpack-MultiplePage-master\npm-debug.log
这个报错遇到过么