1 Star 2 Fork 0

Alvis/cesium-with-threejs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path')
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
/* eslint-disable-next-line */
const development = process.env.NODE_ENV === 'development'
/* eslint-disable-next-line */
const production = process.env.NODE_ENV === 'production'
const CesiumSource = path.join('node_modules', 'cesium', 'Build', 'Cesium')
const config = {
publicPath: './',
transpileDependencies: [
'@cesium/engine'
],
configureWebpack: {
plugins: [
new CopyWebpackPlugin([{ from: path.join(CesiumSource, 'Assets'), to: 'Assets' }]),
new CopyWebpackPlugin([{ from: path.join(CesiumSource, 'ThirdParty'), to: 'ThirdParty' }]),
new CopyWebpackPlugin([{ from: path.join(CesiumSource, 'Widgets'), to: 'Widgets' }]),
new CopyWebpackPlugin([{ from: path.join(CesiumSource, 'Workers'), to: 'Workers' }]),
new webpack.DefinePlugin({
CESIUM_BASE_URL: JSON.stringify('./')
})
],
module: {
unknownContextCritical: false,
rules: [
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
]
},
// {
// test: /\.glsl$/,
// use: [
// {
// loader: 'webpack-glsl'
// }
// ]
// },
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'raw-loader',
'glslify-loader'
]
}
]
}
}
}
module.exports = config
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alvisisme/cesium-with-threejs.git
git@gitee.com:alvisisme/cesium-with-threejs.git
alvisisme
cesium-with-threejs
cesium-with-threejs
master

搜索帮助