Skip to content

Environment folder outside Angular #24

Open
@newuser44

Description

@newuser44

We have multiple apps and trying to not have duplicated code everything.

Trying to move as much in some higher folder and then include it in multiple apps.

Apps
--Enviroments
--Components
--App1
tsconfig.json
-- -- src/app
config/webpack.config.js

I just need the webpack to see the Environments.

I changed the environment Path function to find the correct file.

var filePath = '../environments/environment' + (env === 'prod' ? '' : '.' + env) + '.ts';

I don't know if I need to change tsConfig.json file.

"paths": {
"@app/env": [
"environments/environment"
]
}

I'm unclear if this path is an actually path or something else?

Anytime I build I just get
Cannot find module '@app/env'. in all my component files.
The component files are outside the normal Angular /src/app/pages location.

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