【发布时间】:2016-07-29 14:42:16
【问题描述】:
得到这个错误:
多主程序中的错误 找不到模块:错误:无法解析 C:\Users\username\Deskto 中的模块“反应” p\reactApp @ 多主
module.exports = config;
var config = {
entry: './main.js',
output: {
path:'./',
filename: 'index.js',
},
devServer: {
inline: true,
port: 8080
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'react',
query: {
presets: ['es2015', 'react']
}
}]
}
}
节点版本 - 4.4.7
npm 版本 - 3.10.5
Babel 全局加载
npm install -g babel
npm install -g babel-preset-react
【问题讨论】:
-
你是怎么做到的?