tauri-config.js 707 B

1234567891011121314151617181920212223242526272829
  1. const appPaths = require('./app-paths'),
  2. merge = require('webpack-merge')
  3. module.exports = cfg => {
  4. const tauriConf = require(appPaths.resolve.app('tauri.conf.js'))(cfg.ctx)
  5. const config = merge({
  6. build: {},
  7. ctx: {},
  8. tauri: {
  9. embeddedServer: {
  10. active: true
  11. },
  12. bundle: {
  13. active: true
  14. },
  15. whitelist: {},
  16. window: {
  17. title: require(appPaths.resolve.app('package.json')).productName
  18. },
  19. security: {
  20. csp: 'default-src data: filesystem: ws: http: https: \'unsafe-eval\' \'unsafe-inline\''
  21. }
  22. }
  23. }, tauriConf, cfg)
  24. process.env.TAURI_DIST_DIR = appPaths.resolve.app(config.build.distDir)
  25. return config
  26. }