Skip to content

Commit b2d0d8e

Browse files
fix(dependency): Upgrade all project dependencies.
- Webpack 4 to Webpack 5 - Vue 2.6 to Vue 2.7 - Vue CLI 4 to Vue CLI 5
1 parent 0d489ab commit b2d0d8e

File tree

8 files changed

+59
-51
lines changed

8 files changed

+59
-51
lines changed

.eslintrc.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
module.exports = {
22
root: true,
33
env: {
4-
node: true
4+
node: true,
55
},
66
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
77
parserOptions: {
8-
parser: "babel-eslint"
8+
parser: "@babel/eslint-parser",
99
},
1010
rules: {
1111
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
12-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
12+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
1313
},
1414
overrides: [
1515
{
1616
files: [
1717
"**/__tests__/*.{j,t}s?(x)",
18-
"**/tests/unit/**/*.spec.{j,t}s?(x)"
18+
"**/tests/unit/**/*.spec.{j,t}s?(x)",
1919
],
2020
env: {
21-
jest: true
22-
}
23-
}
24-
]
21+
jest: true,
22+
},
23+
},
24+
],
2525
};

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
node_modules
33
yarn.lock
4+
dist
45

56
# local env files
67
.env.local

package.json

+26-24
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@
99
"lint": "vue-cli-service lint"
1010
},
1111
"dependencies": {
12-
"cesium": "^1.73.0",
13-
"core-js": "^3.6.5",
14-
"vue": "^2.6.12",
15-
"vue-router": "^3.2.0",
16-
"vuex": "^3.4.0"
12+
"cesium": "1.97.0",
13+
"core-js": "3.25.0",
14+
"vue": "2.7.10",
15+
"vue-router": "3.6.5",
16+
"vuex": "3.6.2"
1717
},
1818
"devDependencies": {
19-
"@vue/cli-plugin-babel": "~4.5.0",
20-
"@vue/cli-plugin-eslint": "~4.5.0",
21-
"@vue/cli-plugin-router": "~4.5.0",
22-
"@vue/cli-plugin-unit-jest": "~4.5.0",
23-
"@vue/cli-plugin-vuex": "~4.5.0",
24-
"@vue/cli-service": "~4.5.0",
25-
"@vue/eslint-config-prettier": "^6.0.0",
26-
"@vue/test-utils": "^1.0.3",
27-
"vue-template-compiler": "^2.6.11",
28-
"babel-eslint": "^10.1.0",
29-
"eslint": "^6.7.2",
30-
"prettier": "^1.19.1",
31-
"eslint-plugin-prettier": "^3.1.3",
32-
"eslint-plugin-vue": "^6.2.2",
33-
"sass": "^1.26.11",
34-
"dart-sass": "^1.25.0",
35-
"sass-loader": "^10.0.2",
36-
"copy-webpack-plugin": "^6.0.3",
37-
"webpack": "^4.44.2"
19+
"@babel/core": "^7.19.0",
20+
"@babel/eslint-parser": "7.18.9",
21+
"@vue/cli-plugin-babel": "5.0.8",
22+
"@vue/cli-plugin-eslint": "5.0.8",
23+
"@vue/cli-plugin-router": "5.0.8",
24+
"@vue/cli-plugin-unit-jest": "5.0.8",
25+
"@vue/cli-plugin-vuex": "5.0.8",
26+
"@vue/cli-service": "5.0.8",
27+
"@vue/eslint-config-prettier": "7.0.0",
28+
"@vue/test-utils": "1.3.0",
29+
"copy-webpack-plugin": "11.0.0",
30+
"eslint": "8.22.0",
31+
"eslint-plugin-prettier": "4.2.1",
32+
"eslint-plugin-vue": "9.4.0",
33+
"jest": "27.5.1",
34+
"node-polyfill-webpack-plugin": "^2.0.1",
35+
"prettier": "2.7.1",
36+
"sass": "1.54.8",
37+
"sass-loader": "13.0.2",
38+
"vue-template-compiler": "2.7.10",
39+
"webpack": "5.74.0"
3840
}
3941
}

src/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Vue.config.productionTip = false;
88
new Vue({
99
router,
1010
store,
11-
render: h => h(App)
11+
render: (h) => h(App),
1212
}).$mount("#app");

src/router/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ const routes = [
77
{
88
path: "/",
99
name: "Map",
10-
component: () => import(/* webpackChunkName: "map" */ "../views/Map.vue")
11-
}
10+
component: () =>
11+
import(/* webpackChunkName: "map" */ "../views/CesiumViewer.vue"),
12+
},
1213
];
1314

1415
const router = new VueRouter({
15-
routes
16+
routes,
1617
});
1718

1819
export default router;

src/store/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export default new Vuex.Store({
77
state: {},
88
mutations: {},
99
actions: {},
10-
modules: {}
10+
modules: {},
1111
});

src/views/Map.vue renamed to src/views/CesiumViewer.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "cesium/Build/Cesium/Widgets/widgets.css";
77
import * as Cesium from "cesium";
88
99
export default {
10-
name: "Map",
10+
name: "CesiumViewer",
1111
mounted() {
1212
this.init();
1313
},
@@ -18,7 +18,7 @@ export default {
1818
let imageryLayers = viewer.imageryLayers;
1919
2020
let googleMap = new Cesium.UrlTemplateImageryProvider({
21-
url: "http://www.google.com/maps/vt?lyrs=s@716&x={x}&y={y}&z={z}"
21+
url: "http://www.google.com/maps/vt?lyrs=s@716&x={x}&y={y}&z={z}",
2222
});
2323
2424
imageryLayers.addImageryProvider(googleMap);
@@ -33,12 +33,12 @@ export default {
3333
orientation: {
3434
heading: Cesium.Math.toRadians(0),
3535
pitch: Cesium.Math.toRadians(-90),
36-
roll: 0.0
36+
roll: 0.0,
3737
},
38-
duration: 10 // fly time 10s
38+
duration: 10, // fly time 10s
3939
});
40-
}
41-
}
40+
},
41+
},
4242
};
4343
</script>
4444

vue.config.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
// vue.config.js
22
const CopyWebpackPlugin = require("copy-webpack-plugin");
3+
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
34
const webpack = require("webpack");
45

56
module.exports = {
67
publicPath:
78
process.env.NODE_ENV === "production" ? "/\n" + "vue-cesium-example/" : "/",
89
configureWebpack: {
10+
node: {},
911
plugins: [
1012
// Copy Cesium Assets, Widgets, and Workers to a static directory
1113
new CopyWebpackPlugin({
1214
patterns: [
1315
{ from: "node_modules/cesium/Build/Cesium/Workers", to: "Workers" },
1416
{
1517
from: "node_modules/cesium/Build/Cesium/ThirdParty",
16-
to: "ThirdParty"
18+
to: "ThirdParty",
1719
},
1820
{ from: "node_modules/cesium/Build/Cesium/Assets", to: "Assets" },
19-
{ from: "node_modules/cesium/Build/Cesium/Widgets", to: "Widgets" }
20-
]
21+
{ from: "node_modules/cesium/Build/Cesium/Widgets", to: "Widgets" },
22+
],
2123
}),
24+
new NodePolyfillPlugin(),
2225
new webpack.DefinePlugin({
2326
// Define relative base path in cesium for loading assets
24-
CESIUM_BASE_URL: JSON.stringify("")
25-
})
27+
CESIUM_BASE_URL: JSON.stringify(""),
28+
}),
2629
],
2730
module: {
2831
// Removes these errors: "Critical dependency: require function is used in a way in which dependencies cannot be statically extracted"
2932
// https://github.com/AnalyticalGraphicsInc/cesium-webpack-example/issues/6
3033
unknownContextCritical: false,
31-
unknownContextRegExp: /\/cesium\/cesium\/Source\/Core\/buildModuleUrl\.js/
32-
}
33-
}
34+
unknownContextRegExp:
35+
/\/cesium\/cesium\/Source\/Core\/buildModuleUrl\.js/,
36+
},
37+
},
3438
};

0 commit comments

Comments
 (0)