const path = require('path') const webpack = require('webpack') const cesiumSource = './node_modules/cesium/Source' const cesiumWorkers = '../Build/Cesium/Workers' const CopyWebpackPlugin = require('copy-webpack-plugin') const publicPath = '/' module.exports = { publicPath, devServer: { open: true, }, configureWebpack: { plugins: [ new CopyWebpackPlugin([ { from: path.join(cesiumSource, cesiumWorkers), to: 'Workers' }, ]), new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'Assets'), to: 'Assets' }, ]), new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'Widgets'), to: 'Widgets' }, ]), new CopyWebpackPlugin([ { from: path.join(cesiumSource, 'ThirdParty/Workers'), to: 'ThirdParty/Workers', }, ]), new webpack.DefinePlugin({ CESIUM_BASE_URL: JSON.stringify(publicPath), }), ], resolve: { alias: { vue$: 'vue/dist/vue.esm.js', '@': path.resolve('src'), cesium: path.resolve(__dirname, cesiumSource), }, }, }, }
正文
vue-cli配置cesium
文章版权声明:除非注明,否则均为
譬如朝露_策温技术开发工作室博客原创文章,转载或复制请以超链接形式并注明出处。
发表评论
侧栏公告
寄语
譬如朝露博客是一个分享前端知识的网站,联系方式11523518。
热评文章
标签列表
热门文章
友情链接