最新回答 / 长城不倒
对,3.0以上版本是用options传参数,必须包含在对象里面,比如:use: [ 'style-loader', { loader: 'css-loader', options: { importLoaders: 1 } }, { loader: 'postcss-loader', opt...
2017-08-17
已采纳回答 / qq_瞭望_2
webpack根据入口文件去寻找项目所引入的文件,进而对css,图片,字体等等进行压缩。webpack.config.js是用来配置webpack的,没有引入html
2017-08-17
最新回答 / Tanjia
变量layer不能和引用文件对象重名,改一下:const App=function (){
var dom=document.getElementById("app");
var layer_a=new Layer();
dom.innerHTML=layer_a.tpl;
};
2017-08-16
我勒个去,真的是一个版本一个写法啊,path: path.resolve(__dirname, 'dist')
2017-08-16
已采纳回答 / 虚年_640
webpack.config.js中要给util文件夹配置别名resolve: { alias: { util: __dirname + '/src/util' }}
2017-08-16
ERROR in Template execution failed: TypeError: Cannot read property 'entry' of undefined
2017-08-15
在 js中写模板字符串 报错啊
<script type="text/javascript">
<%=
htmlWebpackPlugin.files.chunks.main.entry.substr(htmlWebpackPlugin.files.publicPath.length)
%>
</script>
<script type="text/javascript">
<%=
htmlWebpackPlugin.files.chunks.main.entry.substr(htmlWebpackPlugin.files.publicPath.length)
%>
</script>
2017-08-15