Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiled env.config.js #2218

Open
brian428 opened this issue Feb 20, 2018 · 1 comment
Open

Compiled env.config.js #2218

brian428 opened this issue Feb 20, 2018 · 1 comment

Comments

@brian428
Copy link
Contributor

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.

@brian428
Copy link
Contributor Author

To add: just to be safe, I also added the new exclusions to build.assets.prod.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant