mac电脑 webpack - configuration.output.path: The provided value "./dist/" is not an absolute path!
2017-08-11 15:22
567 查看
在mac 电脑上配置webpack.json.js 中的路径时出现如下错误:
- configuration.output.path: The provided value "./dist/" is not an absolute path!
//enter入口文件也就是要打包的文件,output输出文件也就是打包成什么文件
module.exports = {
entry:"./js/blow.js",
output:{
path:"./dist/",
filename:"bundle.js"
},
module:{
loaders:[
{ test:/\.css$/,loader:'style-loader'},
{ test:/\.css$/,loader:'css-loader'}
]
}
}
window中这样配置是没有问题的,但是mac中就会出错了,因为mac中需要获取当前文件的路径
[b]entry:__dirname+ "/js/blow.js",添加一个——dirname或者写成blow.js的绝对路径。[/b]
- configuration.output.path: The provided value "./dist/" is not an absolute path!
//enter入口文件也就是要打包的文件,output输出文件也就是打包成什么文件
module.exports = {
entry:"./js/blow.js",
output:{
path:"./dist/",
filename:"bundle.js"
},
module:{
loaders:[
{ test:/\.css$/,loader:'style-loader'},
{ test:/\.css$/,loader:'css-loader'}
]
}
}
window中这样配置是没有问题的,但是mac中就会出错了,因为mac中需要获取当前文件的路径
[b]entry:__dirname+ "/js/blow.js",添加一个——dirname或者写成blow.js的绝对路径。[/b]
相关文章推荐
- 打包提示 - configuration.output.path: The provided value "./dist/js" is not an absolute path!
- configuration.output.path: The provided value "./" is not an absolute path!
- IDEA错误:Cannot start compilation: the output path is not specified for module "Test". Specify the out
- VS2005智能设备项目的Bug:"The OutputPath property is not set for this project..."
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<WKWebViewConfiguration 0x1701bcd20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the k
- The path "/usr/src/linux/include" is not an existing directory.
- "Missing or invalid signature. The bundle '' at bundle path '' is not signed using an Apple submiss
- VS2005智能设备项目的Bug:"The OutputPath property is not set for this project..."
- IDEA错误:Cannot start compilation: the output path is not specified for module "Test". (转)
- The path "/usr/src/linux/include" is not an existing directory.解决方式
- the bundle "你的bundle"at bundle path"包名"is not signed using an Apple submission certificate
- Cannot start compilation: the output path is not specified for module "HelloWorld". Specify the outp
- Cannot start compilation: the output path is not specified for module "..." Specify the output path
- IDEA错误:Cannot start compilation: the output path is not specified for module "Test". Specify the out
- Cannot start compilation: the output path is not specified for module "..." Specify the output path
- JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path