No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Get platform inside config/index.js

    Help
    1
    1
    615
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      philliperosario last edited by

      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: {}
        }
      }
      
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post