Get platform inside config/index.js



  • How I know if the plataform is cordova inside config/index.js?

    var path = require('path')
    
    module.exports = {
      // Webpack aliases
      aliases: {
        quasar: path.resolve(__dirname, '../node_modules/quasar-framework/'),
        src: path.resolve(__dirname, '../src'),
        assets: path.resolve(__dirname, '../src/assets'),
        '@': path.resolve(__dirname, '../src/components'),
        variables: path.resolve(__dirname, '../src/themes/quasar.variables.styl'),
        'vuex-store': path.resolve(__dirname, '../src/store'),
        package: path.resolve(__dirname, '../package.json')
      },
      progressFormat: ' [:bar] ' + ':percent'.bold + ' (:msg)',
      defaultTheme: 'mat',
    
      build: {
        env: require('./prod.env'),
        publicPath: [Platform.is.cordova] ? '' : '/', // ON HERE! I NEED TO KNOW IF THE PLATFORM IS CORDOVA
        productionSourceMap: false,
        purifyCSS: true
      },
      dev: {
        env: require('./dev.env'),
        cssSourceMap: true,
        openBrowser: false,
        publicPath: '/',
        port: 8080,
        proxyTable: {}
      }
    }
    
    

Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.