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

How to use the application builder with ngssc? #87

Closed
sandrooco opened this issue Nov 10, 2023 · 0 comments · Fixed by #88
Closed

How to use the application builder with ngssc? #87

sandrooco opened this issue Nov 10, 2023 · 0 comments · Fixed by #88

Comments

@sandrooco
Copy link

sandrooco commented Nov 10, 2023

I updated my project to Angular 17 and wanted to try out the vite/application builder.
When building the project, there's a new structure in dist than before.

New structure

dist
└── my-cool-projectname
    ├── 3rdpartylicenses.txt
    ├── browser
    │   ├── favicon.ico
    │   ├── index.html
    │   ├── main-HXV5IAUK.js
    │   ├── polyfills-F4P3OIQ6.js
    │   └── styles-RDUYNHTE.css
    └── ngssc.json

Old structure

dist
└── my-cool-projectname
    ├── favicon.ico
    ├── index.html
    ├── main.js
    ├── main.js.map
    ├── polyfills.js
    ├── polyfills.js.map
    ├── runtime.js
    ├── runtime.js.map
    ├── styles.css
    ├── styles.css.map
    ├── vendor.js
    └── vendor.js.map

So I guess that I need to change something in Dockerfile. Simply changing COPY dist/my-cool-projectname . to COPY dist/my-cool-projectname/browser . doesn't work.
I suspect that this has something to do with SSR - do you have any advice?

kyubisation added a commit that referenced this issue Nov 12, 2023
This PR adapts the `ngsscbuild` builder to the new `@angular-devkit/build-angular:application` builder.
When using `@angular-devkit/build-angular:application` with a `server` configuration, the `filePattern` is extended to also include the `index.server.html` file. If using `@angular-devkit/build-angular:application` without a `server` configuration, the `ngssc.json` file is generated inside the `{outputPath}/browser` directory, next to the browser files.

Closes #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant