@jeffjade
2016-04-06T18:47:44.000000Z
字数 821
阅读 1614
Gulp
Vue
This repo is a collection of simple demos of Webpack[By阮一峰].
https://github.com/ruanyf/webpack-demos
resolveLoader: {
root: path.join(__dirname, "node_modules")
},
resolve: {
root: path.join(__dirname, "node_modules"),
modulesDirectories: ['node_modules'],
// Allow to omit extensions when requiring these files
extensions: ["", ".js", ".jsx"]
}
书写vue样式文件中url路径后不能添加与无关的东西,。比如下代码:
.drawbox {
width: 87%;
height: 99%;
position: absolute;
right: 6%;
bottom: 13.5%;
background: url(./../assets/rotary.png);
/*background: url(./../assets/rotary.png?v1)无法解析*/
background-size: 100% 100%;
}
无法解析,编译时会报错如下:
ERROR in ./assets/rotary.png?v1
Module parse failed: E:\xxx\assets\rotary.png?v1 Line 1: Unexpected token ILLEGAL
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)