当前位置: 首页 > article >正文

34.基于webpack搭建开发环境

一、webpack配置问题
webpack确实强大,但是配置loader、plugin也确实存在与node、npm、webpack版本之间存在冲突的问题(真正的从入门到放弃)。为了方便平时的开发,我基于webpack4.x 整合了react、vue3、ts开发环境,支持less、eslint、babel等,具体详见package.json。

二、下载后可以根据自己的实际需求修改package.json。下载地址:https://gitee.com/jly1314520/my-webpack.git。

{
  "name": "testwebpack",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "webpack",
    "server": "webpack-dev-server --open",
    "mpa": "webpack --config ./webpack.mpa.config.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.23.3",
    "@babel/preset-env": "^7.23.3",
    "@babel/preset-react": "^7.23.3",
    "@babel/preset-typescript": "^7.23.3",
    "autoprefixer": "^10.1.0",
    "babel-loader": "^8.3.0",
    "clean-webpack-plugin": "^3.0.0",
    "css-loader": "^5.0.1",
    "cssnano": "^4.1.10",
    "eslint": "^8.54.0",
    "eslint-config-semistandard": "^17.0.0",
    "eslint-config-standard": "^17.1.0",
    "eslint-plugin-import": "^2.29.0",
    "eslint-plugin-n": "^15.7.0",
    "eslint-plugin-promise": "^6.1.1",
    "express": "^4.17.1",
    "file-loader": "^6.2.0",
    "glob": "^7.1.6",
    "html-webpack-plugin": "^4.5.0",
    "less": "^3.5.0",
    "less-loader": "^7.1.0",
    "mini-css-extract-plugin": "^1.3.3",
    "postcss": "^8.2.1",
    "postcss-loader": "^4.1.0",
    "style-loader": "^2.0.0",
    "url-loader": "^4.1.1",
    "vue-loader": "^17.3.1",
    "vue-template-compiler": "^2.7.15",
    "webpack": "^4.43.0",
    "webpack-cli": "^3.3.12",
    "webpack-dev-server": "^3.11.0"
  },
  "dependencies": {
    "@babel/polyfill": "^7.12.1",
    "axios": "^0.21.1",
    "core-js": "^2.6.12",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "vue": "^3.3.8"
  }
}






http://www.kler.cn/a/149354.html

相关文章:

  • 代码 RNN原理及手写复现
  • 深度学习代码笔记
  • 使用kalibr_calibration标定相机(realsense)和imu(h7min)
  • RHCE的学习(16)(shell脚本编程)
  • 场景解决之mybatis当中resultType= map时,因某个字段为null导致返回的map的key不存在怎么处理
  • 重新认识HTTPS
  • ground truth 在深度学习任务中代表的是什么意思?
  • 第二证券:机构密集调研消费电子、半导体产业链
  • 三大录屏软件推荐,让你轻松录制屏幕
  • Vue实现纯前端导入excel数据
  • FFmpeg介绍
  • PHPStudy开发环境解决:启动报错 class websocket/server not found
  • 【问题系列】消费者与MQ连接断开问题解决方案(二)
  • Python的哈希映射:字典
  • API网关
  • Java中的mysql——面试题+答案——第24期
  • 苹果提醒事项怎么用?几个简单步骤就能学会!
  • Hadoop集群升级(3.1.3 -> 3.2.4)
  • 图表控件LightningChart .NET中文教程 - 如何创建WPF 2D热图?(二)
  • C#中的async/await异步编程模型
  • 使用git下载远程所有分支到本地
  • SpringBoot+网易邮箱登录注册
  • Rabbitmq发送邮件并消费邮件
  • Node.js下载安装教程
  • 开放式耳机性价比排行榜、开放式耳机性价比排行榜前十
  • 数据库常见的数据模型