Why environment import is importing a Module (Angular 14)?

Discussão em 'Angular' iniciado por Oscar TJ, Março 18, 2025.

  1. Oscar TJ

    Oscar TJ Guest

    I'm importing the environment const from the environment.ts file and, as you can see from the image below, I have a Module reference instead of a constant...

    I'm going crazy...what is happening?

    [​IMG]

    My environment.ts file is something like this:

    export const environment = {
    ...
    }


    and this is how I'm importing it

    import { environment } from '../../../environments/environment';


    I'm using Angular 14 and the fileReplacement configuration is set like this

    "fileReplacements": [
    {
    "replace": "projects/nr-b2b/src/environments/environment.ts",
    "with": "projects/nr-b2b/src/environments/environment.localdev.ts"
    }
    ]


    This the serve script

    ng serve --project=nr-b2b --configuration=localdev

    Continue reading...

Compartilhe esta Página