webpack 遇到报错情况及解决
-
webpack2 报错:optimize.OccurenceOrderPlugin is not a function。
原因:上个版本拼写错误,少写了一个字母r,新版本修正过来了。要写成这样:OccurrenceOrderPlugin。 -
报错:This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
解决:
{
resolve: {
alias: {
'react': 'my/react/path'
}
},
module: {
noParse: [/react/]
}
}