forked from ibigbug/antd-build
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
内置 html-webpack-plugin #53
Comments
现在项目基本都是有自己的 html 作为调试文件,部署后就不用这个文件。另外,现在 html 文件里面不仅是加载 js,css 文件,还有一些自定义配置,比如: <script>
global.config = {
host:'',
user:{}
};
</script> 所以,要是需要就采用直接配置 webpack.config.js 的方式。 |
离线包需要,内置进来吧。使用的时候在 js 里 |
支持 html 之后,build 之后的 dist 下的文件就直接可用了。deploy 之类的操作会方便一些。 |
参考代码: var htmlLoader = [
'file-loader?name=[path][name].[ext]',
'template-html-loader?' + [
'raw=true',
'engine=lodash',
'version=' + pkg.version,
'title=' + pkg.name,
'debug=' + DEBUG
].join('&')
].join('!');
{
test: /\.html$/,
loader: htmlLoader,
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
html
文件做为开发时的必要内容,把这个插件集成进来吧https://www.npmjs.com/package/html-webpack-plugin
The text was updated successfully, but these errors were encountered: