2 Star 4 Fork 1

Admin/cesium_vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
Admin 提交于 2021-10-18 22:07 . 第一次整合提交
const CopyWebpackPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
module.exports = {
// 基本路径 3.6之前的版本时 baseUrl
publicPath: "./",
// 输出文件目录
outputDir: "dist",
// eslint-loader 是否在保存的时候检查
lintOnSave: false,
transpileDependencies: true,
configureWebpack: {
plugins: [
// Copy Cesium Assets, Widgets, and Workers to a static directory
new CopyWebpackPlugin({
patterns: [{
from: "node_modules/cesium/Build/Cesium/Workers",
to: "Workers"
},
{
from: "node_modules/cesium/Build/Cesium/ThirdParty",
to: "ThirdParty"
},
{
from: "node_modules/cesium/Build/Cesium/Assets",
to: "Assets"
},
{
from: "node_modules/cesium/Build/Cesium/Widgets",
to: "Widgets"
}
]
}),
new webpack.DefinePlugin({
// Define relative base path in cesium for loading assets
CESIUM_BASE_URL: JSON.stringify("")
})
],
module: {
// Removes these errors: "Critical dependency: require function is used in a way in which dependencies cannot be statically extracted"
// https://github.com/AnalyticalGraphicsInc/cesium-webpack-example/issues/6
unknownContextCritical: false,
unknownContextRegExp: /\/cesium\/cesium\/Source\/Core\/buildModuleUrl\.js/
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/do_2674388488/cesium_vue.git
git@gitee.com:do_2674388488/cesium_vue.git
do_2674388488
cesium_vue
cesium_vue
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385