Skip to content

How to have compiled files in a sub-folder #3932

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

Closed
phillip-haydon opened this issue Jan 10, 2017 · 2 comments
Closed

How to have compiled files in a sub-folder #3932

phillip-haydon opened this issue Jan 10, 2017 · 2 comments

Comments

@phillip-haydon
Copy link
Contributor

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

All

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.19-3
node: 6.3.1
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

n/a

The log given by the failure.

Normally this include a stack trace and some more information.

n/a

Mention any other details that might be useful.

I'm hosting a site in AWS S3, and the site, and different API's are passed through Gateway API.

In order to have routing working in Angular I have to have a proxy resource which returns the index.html from S3, then have all assets loaded from a sub-directory from /assets/....

If I move the files manually I get:

Uncaught TypeError: e.map is not a function
    at t.parameters (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:1346:663)
    at e.parameters (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:1353:502)
    at t.getDependenciesMetadata (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:9225)
    at t.getTypeMetadata (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:8543)
    at t.getDirectiveMetadata (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:3577)
    at https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:4705
    at Array.forEach (native)
    at t.getNgModuleMetadata (https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:4564)
    at https://app.*site*.net/assets/main.80e8f7b5792f4a5fc6e9.bundle.js:638:4373
    at Array.forEach (native)

I could solve this by introducing Cloudfront for the assets then setting up 404 behavior to return the /index.html, but then I can no longer version off the assets in S3.

Basically without the ability to have sub-folders for the assets, angular-cli becomes useless :(

I don't want to have to drop the CLI as it's super handy and makes Angular more enjoyable.


Thanks! We'll be in touch soon.

@filipesilva
Copy link
Contributor

Fixed by #3285.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants