Skip to content

Unable to avoid hard coding for one signal app_id in init. #30

@TakasiVenkataSandeep-08

Description

@TakasiVenkataSandeep-08

Hi, i am implementing onesignal integration in nuxt js but i am unable to replace the hardcoded one signal ids in nuxt config because i am unable to access environment variables while deploying.

currently my onesignal config looks like this:

oneSignal: {
    cdn: true,
    init: {
      appId: "hard-coded-id",
      safari_web_id: "hard-coded-id",
      allowLocalhostAsSecureOrigin: true,
      welcomeNotification: {
        disable: true,
      },
    }
  },

need to modify it like:

  oneSignal: {
    cdn: true,
    init: {
      appId: process.env.APP_ID,
      safari_web_id: process.env.SAFARI_WEB_ID,
      allowLocalhostAsSecureOrigin: true,
      welcomeNotification: {
        disable: true,
      },
    }
  },

is there any way out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions