Skip to content
New issue

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

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

Already on GitHub? # to your account

Styles are not loaded on Angular 17 project when hosting builded version, only when they are declared on the styles array #530

Open
Vikms95 opened this issue Oct 18, 2024 · 0 comments

Comments

@Vikms95
Copy link

Vikms95 commented Oct 18, 2024

The styles are well loaded whenever I do use the dev build but whenever I host the builded version, no styles are loaded at all. This causes Driver.js to not work on production environment when they project is hosted. I need to declare the file in the corresponding angular.json file so the styles are loaded, as in:

"build": {
          "builder": "@angular-devkit/build-angular:browser-esbuild",
          "options": {
            "outputPath": "dist/myproject",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "inlineStyleLanguage": "scss",
            "styles": [
              "src/styles.scss",
              "node_modules/driver.js/dist/driver.css"
            ],
          },

This does not seem right.

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

No branches or pull requests

1 participant