Skip to content

Compiled env.config.js #2218

Description

@brian428

Minko, I ran into an issue where the env.config.ts is being compiled into JS, and when a dev reload happens, the ENV_CONFIG value stops getting replaced. Or more specifically, the compiled JS version without the replacement seems to be getting copied over to /dist during the asset copy. So an error is thrown since JSON.parse('<%= ENV_CONFIG %>'); is invalid.

I found an older issue #1747 which seems to be the same problem. In order to solve it, I had to modify build.assets.dev.ts to add:

'!' + join(Config.APP_SRC, '**', 'env.config.js'),
'!' + join(Config.APP_SRC, '**', 'env.config.js.map'),

I'm not sure why this suddenly started being a problem, but I thought I would mention it again in case the additional exclusions are something you want to include in the seed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions