Closed ENCIGuo closed 1 year ago
看起来和 #62 相同 贴一下 package.json 的配置吧,我研究一下
{ "name": "myvue", "version": "1.0.0", "description": "A Vue.js project", "author": "DecCapriom 1643927311@qq.com", "private": true, "scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "start": "npm run dev", "unit": "jest --config test/unit/jest.conf.js --coverage", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e", "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", "build": "node build/build.js" }, "dependencies": { "element-ui": "^2.15.13", "js-cookie": "^3.0.1", "v-code-diff": "^1.3.1", "vue": "^2.5.2", "vue-i18n": "^8.28.2", "vue-router": "^3.6.5" }, "devDependencies": { "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-eslint": "^8.2.1", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-jest": "^21.0.2", "babel-loader": "^7.1.1", "babel-plugin-dynamic-import-node": "^1.2.0", "babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", "babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-vue-jsx": "^3.5.0", "babel-preset-env": "^1.3.2", "babel-preset-stage-2": "^6.22.0", "babel-register": "^6.22.0", "chalk": "^2.0.1", "chromedriver": "^2.27.2", "copy-webpack-plugin": "^4.0.1", "cross-spawn": "^5.0.1", "css-loader": "^0.28.0", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", "eslint-loader": "^1.7.1", "eslint-plugin-import": "^2.7.0", "eslint-plugin-node": "^5.2.0", "eslint-plugin-promise": "^3.4.0", "eslint-plugin-standard": "^3.0.1", "eslint-plugin-vue": "^4.0.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "html-webpack-plugin": "^2.30.1", "jest": "^22.0.4", "jest-serializer-vue": "^0.3.0", "nightwatch": "^0.9.12", "node-notifier": "^5.1.2", "optimize-css-assets-webpack-plugin": "^3.2.0", "ora": "^1.2.0", "portfinder": "^1.0.13", "postcss-import": "^11.0.0", "postcss-loader": "^2.0.8", "postcss-url": "^7.2.1", "rimraf": "^2.6.0", "selenium-server": "^3.0.1", "semver": "^5.3.0", "shelljs": "^0.7.6", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vue-jest": "^1.0.2", "vue-loader": "^13.3.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.5.2", "webpack": "^3.6.0", "webpack-bundle-analyzer": "^2.9.0", "webpack-dev-server": "^2.9.1", "webpack-merge": "^4.1.0" }, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ] }
看起来似乎还不是用 vue.config.js 启动的 vuecli 项目,是最原始那种直接用 webpack config 文件启动的 vue 项目。这样我没有配置文件还无法启动 你能把项目删减到最小可复现版本,然后代码提供给我看下么?
收到,问题定位到 #62 一样,我看看有没有办法做一些兼容
我也遇到了同样的问题,甚至启动项目的报错都一致。 我参考了 #62 这个,把 ./node_modules/v-code-diff/dist/index.es.js 内的两个不带 catch 参数的代码修改了一下项目旧跑起来了
我也遇到了同样的问题,甚至启动项目的报错都一致。 我参考了 #62 这个,把 ./node_modules/v-code-diff/dist/index.es.js 内的两个不带 catch 参数的代码修改了一下项目旧跑起来了
在研究办法修复了,可以先指定 1.2.0 版本看看。"v-code-diff": "1.2.0"
我也遇到了同样的问题,甚至启动项目的报错都一致。 我参考了 #62 这个,把 ./node_modules/v-code-diff/dist/index.es.js 内的两个不带 catch 参数的代码修改了一下项目旧跑起来了
在研究办法修复了,可以先指定 1.2.0 版本看看。"v-code-diff": "1.2.0"
给你点个star加油解决
@ENCIGuo @doooghan @cyaj 通过把 target 降低到 es2018,1.3.2 版本已经修复这个问题,你们可以试下
1.3.2可以,没有报错,v-code-diff可以进行三比对吗?
1.3.2可以,没有报错,v-code-diff可以进行三比对吗?
三点diff吗?那应该是不行的,现在为了性能用的库,diff 出来的内容都不一定和 git diff 相同
每次引入v-code-diff,启动项目之后就会报错 error in ./node_modules/v-code-diff/dist/index.es.js Module parse failed: Unexpected token (594:18) You may need an appropriate loader to handle this file type. | try { | i[s++] = new e.Diff(u, decodeURI(f)); | } catch { | throw new Error("Illegal escape in diff_fromDelta: " + f); | }
@ ./src/main.js 9:0-35 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js