配置webpack的时候一直提示我安装babel-plugin和babel-helper 而且还是一个插件一个插件的提示 但是我看了别人的配置文件都没有安装babel-plugin和babel-helper 有没有什么办法让我不安装或者一次全都安装完
`module.exports={
devtool:'eval-source-map',
entry:__dirname+'/app/main.js',//入口文件
output:{
path:__dirname+'/public',//打包后存放文件路径
filename:'bundle.js'//打包后的文件名
},
module:{
loaders:[
{
test:/\.json$/,
loader:"json"
},
{
test:/\.js$/,
exclude:/node_modules/,
loader:'babel'
}
]
},
devServer: {
contentBase: "./public",//本地服务器所加载的页面所在的目录
port:"63342",
colors: true,//终端中输出结果为彩色
historyApiFallback: true,//不跳转or跳转指向入口文件index???
inline: true//实时刷新
}
}`"devDependencies": {
"autoprefixer": "^6.5.3",
"babel-core": "^6.18.2",
"babel-generator": "^6.19.0",
"babel-helper-call-delegate": "^6.18.0",
"babel-helper-function-name": "^6.18.0",
"babel-helper-get-function-arity": "^6.18.0",
"babel-helper-hoist-variables": "^6.18.0",
"babel-helper-optimise-call-expression": "^6.18.0",
"babel-helper-regex": "^6.18.0",
"babel-helper-replace-supers": "^6.18.0",
"babel-helpers": "^6.16.0",
"babel-loader": "^6.2.8",
"babel-plugin-check-es2015-constants": "^6.8.0",
"babel-plugin-transform-es2015-arrow-functions": "^6.8.0",
"babel-plugin-transform-es2015-block-scoped-functions": "^6.8.0",
"babel-plugin-transform-es2015-block-scoping": "^6.18.0",
"babel-plugin-transform-es2015-classes": "^6.18.0",
"babel-plugin-transform-es2015-computed-properties": "^6.8.0",
"babel-plugin-transform-es2015-constants": "^6.1.4",
"babel-plugin-transform-es2015-shorthand-properties": "^6.18.0",
"babel-plugin-transform-es2015-spread": "^6.8.0",
"babel-plugin-transform-es2015-sticky-regex": "^6.8.0",
"babel-plugin-transform-es2015-template-literals": "^6.8.0",
"babel-plugin-transform-es2015-typeof-symbol": "^6.18.0",
"babel-plugin-transform-es2015-unicode-regex": "^6.11.0",
"babel-plugin-transform-regenerator": "^6.16.1",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-template": "^6.16.0",
"babel-traverse": "^6.19.0",
"extract-text-webpack-plugin": "^1.0.1",
"html-webpack-plugin": "^2.24.1",
"json-loader": "^0.5.4",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.2"
},
"dependencies": {
"react": "^15.4.1",
"react-dom": "^15.4.1"
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你的package.json不是已经把项目依赖的包都列出来了么,直接
npm i就可以把所有依赖的包都安装好的了