请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

.vue中解析jsx报错

图片描述
在tabs组件中使用jsx报错
图片描述
图片描述

按照您的源码改过之后footer.jsx也报错了, 请问这个该怎么解决

正在回答 回答被采纳积分+3

3回答

提问者 慕姐7472009 2019-12-18 08:41:45

经过排查去掉webpack.config.base中的option和include就可以了//img1.sycdn.imooc.com//szimg/5df975c30945dbca06220284.jpg

0 回复 有任何疑惑可以回复我~
提问者 慕姐7472009 2019-12-17 15:12:53

{

  "name": "vue-ssr",

  "version": "1.0.0",

  "description": "",

  "main": "index.js",

  "scripts": {

    "test": "echo \"Error: no test specified\" && exit 1",

    "build:client": "cross-env NODE_ENV=production webpack --config build/webpack.config.client.js",

    "build:server": "cross-env NODE_ENV=production webpack --config build/webpack.config.server.js",

    "build": "npm run clean && npm run build:client && npm run build:server",

    "practice": "cross-env NODE_ENV=development webpack-dev-server --config build/webpack.config.practice.js",

    "clean": "rimraf public && rimraf server-build",

    "lint": "eslint --ext .js --ext .jsx --ext .vue client/",

    "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue client/",

    "dev:client": "cross-env NODE_ENV=development webpack-dev-server --config build/webpack.config.client.js",

    "dev:server": "nodemon server/server.js",

    "dev": "concurrently \"npm run dev:client\" \"npm run dev:server\" ",

    "start": "cross-env NODE_ENV=production node server/server.js"

  },

  "author": "",

  "license": "ISC",

  "dependencies": {

    "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",

    "axios": "^0.19.0",

    "ejs": "^3.0.1",

    "koa": "^2.11.0",

    "koa-router": "^7.4.0",

    "koa-send": "^5.0.0",

    "vue": "^2.6.10",

    "vue-loader-plugin": "^1.3.0",

    "vue-meta": "^2.3.1",

    "vue-router": "^3.1.3",

    "vue-server-renderer": "^2.6.10",

    "vuex": "^3.1.2"

  },

  "devDependencies": {

    "@babel/core": "^7.7.4",

    "@babel/plugin-proposal-class-properties": "^7.7.4",

    "@babel/plugin-proposal-decorators": "^7.7.4",

    "@babel/plugin-proposal-do-expressions": "^7.7.4",

    "@babel/plugin-proposal-export-default-from": "^7.7.4",

    "@babel/plugin-proposal-export-namespace-from": "^7.7.4",

    "@babel/plugin-proposal-function-sent": "^7.7.4",

    "@babel/plugin-proposal-logical-assignment-operators": "^7.7.4",

    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",

    "@babel/plugin-proposal-numeric-separator": "^7.7.4",

    "@babel/plugin-proposal-optional-chaining": "^7.7.5",

    "@babel/plugin-proposal-pipeline-operator": "^7.7.4",

    "@babel/plugin-proposal-throw-expressions": "^7.7.4",

    "@babel/plugin-syntax-dynamic-import": "^7.7.4",

    "@babel/plugin-syntax-import-meta": "^7.7.4",

    "@babel/plugin-syntax-jsx": "^7.7.4",

    "@babel/preset-env": "^7.0.0",

    "@vue/babel-plugin-transform-vue-jsx": "^1.1.2",

    "autoprefixer": "^9.7.2",

    "babel-eslint": "^10.0.3",

    "babel-helper-vue-jsx-merge-props": "^2.0.3",

    "babel-loader": "^8.0.6",

    "concurrently": "^5.0.0",

    "cross-env": "^6.0.3",

    "css-loader": "^3.2.0",

    "fibers": "^4.0.2",

    "file-loader": "^5.0.2",

    "html-webpack-plugin": "^3.2.0",

    "memory-fs": "^0.5.0",

    "mini-css-extract-plugin": "^0.8.0",

    "node-sass": "^4.13.0",

    "nodemon": "^2.0.1",

    "postcss-loader": "^3.0.0",

    "rimraf": "^3.0.0",

    "sass": "^1.23.7",

    "sass-loader": "^8.0.0",

    "style-loader": "^1.0.0",

    "url-loader": "^2.3.0",

    "vue": "^2.6.10",

    "vue-loader": "^15.8.3",

    "vue-style-loader": "^4.1.2",

    "vue-template-compiler": "^2.6.10",

    "webpack": "^4.41.2",

    "webpack-cli": "^3.3.10",

    "webpack-dev-server": "^3.9.0",

    "webpack-merge": "^4.2.2"

  }

}



0 回复 有任何疑惑可以回复我~
提问者 慕姐7472009 2019-12-17 15:12:25

我把您的代码中感觉有可能会有影响的所有依赖的版本都升级成跟我的一样的版本, 但是您的不会报错

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信