88.在HtmlWebpackPlugin中使用excludeChunks项,修改webpack.config.js文件,修改内容如下varwebpack=require(‘webpack‘);
varHtmlWebpackPlugin=require(‘html-webpack-plugin‘);
module.exports={
entry:{
‘Greeter‘:__dirname+"/app/Greeter.js",
‘a‘:__dirname+"/app/a..
分类:
Web程序 时间:
2017-02-20 23:39:57
阅读次数:
389
102.webpack.config.js文件中entry的三种使用方式一对象形式,修改webpack.config.js文件,内容如下module.exports={
entry:{
main:‘./src/script/main.js‘,
a:‘./src/script/a.js‘
},
output:{
path:‘./dist/js‘,
filename:‘[name].js‘
}
}103.使用cnpmrunwebpack命..
分类:
Web程序 时间:
2017-02-20 23:33:33
阅读次数:
202
113.使用for循环输出HtmlWebpackPlugin中的内容,修改模板文件index.html<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge">
<title>webpackdemo</title>
<linkrel="s..
分类:
Web程序 时间:
2017-02-20 23:31:47
阅读次数:
184
116.输出HtmlWebpackPlugin.files中的内容,修改模板文件index.html,代码如下<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge">
<title>webpackdemo</title>
<linkre..
分类:
Web程序 时间:
2017-02-20 23:28:24
阅读次数:
172
119.输出HtmlWebpackPlugin.options中的内容,修改模板文件index.html,代码如下<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge">
<title>webpackdemo</title>
<link..
分类:
Web程序 时间:
2017-02-20 23:26:57
阅读次数:
209
126.使用同一模板文件生成不同文件且标题不同,修改webpack.config.js文件,代码如下varhtmlWebpackPlugin=require("html-webpack-plugin");
module.exports={
entry:{
main:‘./src/script/main.js‘,
a:‘./src/script/a.js‘
},
output:{
path:‘./dist‘,
filename:‘js..
分类:
Web程序 时间:
2017-02-20 23:19:50
阅读次数:
175
133.在模板中以内联的形式引用script脚本,修改webpack.config.js文件,代码如下varhtmlWebpackPlugin=require("html-webpack-plugin");
module.exports={
entry:{
main:‘./src/script/main.js‘,
a:‘./src/script/a.js‘
},
output:{
path:‘./dist‘,
filename:‘js/[na..
分类:
Web程序 时间:
2017-02-20 23:18:16
阅读次数:
192
60.htmlwebpackplugin插件的配置-title的使用,修改webpack.config.js文件,修改的内容如下varwebpack=require(‘webpack‘);
varHtmlWebpackPlugin=require(‘html-webpack-plugin‘);
module.exports={
entry:__dirname+"/app/Greeter.js",
output:{
path:__dirname+"/build",..
分类:
Web程序 时间:
2017-02-20 14:17:15
阅读次数:
269
81.在webpack.config.js文件配置collapseWhitespace项,用于删除空白字符与换行符,修改内容如下varwebpack=require(‘webpack‘);
varHtmlWebpackPlugin=require(‘html-webpack-plugin‘);
module.exports={
entry:__dirname+"/app/Greeter.js",
output:{
path:__dirname+"/bu..
分类:
Web程序 时间:
2017-02-20 14:08:15
阅读次数:
301
在入口main.js里构建scss是通过引入模块的方式 在.vue组件里是单独构建的 里面的rem()是_functions.scss里定义的一个scss函数 然而这个rem()函数一直用不了,找问题找了很长时间,当然最后还是解决了。 webpack在对main.js里引入的scss编译时,分别把每 ...
分类:
Web程序 时间:
2017-02-20 13:52:00
阅读次数:
1778