vue.config.js 696 B

1234567891011121314151617181920212223242526
  1. //vue.config.js
  2. const CopyWebpackPlugin = require('copy-webpack-plugin');
  3. module.exports = {
  4. publicPath: process.env.NODE_ENV === 'production'
  5. ? './'
  6. : '/',
  7. lintOnSave: false,
  8. configureWebpack: config => {
  9. //引入earthsdk
  10. const cwp = new CopyWebpackPlugin([
  11. {
  12. from: './node_modules/earthsdk/dist/XbsjCesium',
  13. to: 'js/earthsdk/XbsjCesium',
  14. toType: 'dir'
  15. },
  16. {
  17. from: './node_modules/earthsdk/dist/XbsjEarth',
  18. to: 'js/earthsdk/XbsjEarth',
  19. toType: 'dir'
  20. }
  21. ]);
  22. config.plugins.push(cwp);
  23. }
  24. };