最新回答 / 慕移动9181930
                                
                                                            很细心,感谢你提意,希望以后多保贵建议,希望课程对我有帮助。kuphfagrgdxqwtnmwotgjbphillbgteccqsamevmrplnqgthhbhbavwmjsfhirbotktawudvtlzwtvnzdkydkvwtiufgzzmewcwdfmimciwxywfwgicagnkwmzcdebcstrunjfguauwggrmopmyfipi
                            
                        
                        2017-02-23
                
            找到原因了,--module-bind 后面的字符串如果是单引号会出错,但是换成双引号就可以了。
运行:webpack hello.js hello.bundle.js --module-bind "css=style-loader!css-loader"
显示ok的。
                运行:webpack hello.js hello.bundle.js --module-bind "css=style-loader!css-loader"
显示ok的。
                    
                    2017-02-23
                
            <% for(var key in htmlWebpackPlugin.files.chunks){ %>
<% if(key !== 'main'){ %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[key].entry %>"></script>
<% } %>
<% } %>
                <% if(key !== 'main'){ %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[key].entry %>"></script>
<% } %>
<% } %>
                    
                    2017-02-23
                
            <script type="text/javascript">
<%= compilation.assets[htmlWebpackPlugin.files.chunks.main.entry.substr(htmlWebpackPlugin.files.publicPath.length)].source() %>
</script>
                <%= compilation.assets[htmlWebpackPlugin.files.chunks.main.entry.substr(htmlWebpackPlugin.files.publicPath.length)].source() %>
</script>
                    
                    2017-02-23
                
            ERROR in ./style.css
Module parse failed: F:\webpack\style.css Unexpected token (1:9)
You may need an appropriate loader to handle this file type.
运行webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader' 报的错
                Module parse failed: F:\webpack\style.css Unexpected token (1:9)
You may need an appropriate loader to handle this file type.
运行webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader' 报的错
                    
                    2017-02-23
                
            <%= htmlWebpackPlugin.files.chunks.main.entry.substr([htmlWebpackPlugin.files.publicPath.length]) %>
                
                    
                    2017-02-23
                
            视频中的webpack版本是1.xx了, 现在通过npm下载的webpack已经是2.xx,所以咯,大家看视频教程练习的时候一定要认清版本。
                
                    
                    2017-02-23
                
            "webpack": "webpack --config webpack.config.js --progress --display-modules --colors --display-reasons"
npm run webpack 即可
                npm run webpack 即可
                    
                    2017-02-23
                
             
             
        









