Skip to content

Commit c82867c

Browse files
committed
hack to test with vue3 and vue2
Problem is that if we say "2 || 3-beta" for vue, yarn always prefers 2 because it's stable. So we have 3-beta in package.json only (and then it installs fine) and force vue2 manually.
1 parent 61fa6e8 commit c82867c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
"ts-loader": "^5.3.0",
9494
"typescript": ">=2.9",
9595
"url-loader": "^4.0.0",
96-
"vue": "^2.3.4 || ^3.0.0beta.9",
97-
"vue-loader": "^15.0.11 || ^16.0.0-alpha.1",
96+
"vue": "^3.0.0beta.9",
97+
"vue-loader": "^16.0.0-alpha.1",
9898
"vue-template-compiler": "^2.3.4",
9999
"webpack-notifier": "^1.6.0",
100100
"zombie": "^6.1.4"

scripts/force-lowest-dependencies.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
const fs = require('fs');
1313
const childProcess = require('child_process');
1414

15+
const vueLowVersion = '^2.3.4';
16+
const vueLoaderLowVersion = '^15.0.11';
17+
1518
function getLowestVersion(dependency, range) {
1619
return new Promise((resolve, reject) => {
1720
childProcess.exec(
@@ -108,6 +111,11 @@ fs.readFile('package.json', (error, data) => {
108111
resolve();
109112
});
110113
}))
114+
.then(() => {
115+
console.log('Manually forcing Vue to version 2');
116+
packageInfo.devDependencies.vue = vueLowVersion;
117+
packageInfo.devDependencies['vue-loader'] = vueLoaderLowVersion;
118+
})
111119
.then(() => {
112120
console.log('Updated package.json file with lowest dependency versions: ');
113121

0 commit comments

Comments
 (0)