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

Vite update leads to missing css in manifest.json #384

Open
notsure opened this issue Sep 19, 2024 · 0 comments
Open

Vite update leads to missing css in manifest.json #384

notsure opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working css Needs changes in the area of CSS high priority

Comments

@notsure
Copy link
Contributor

notsure commented Sep 19, 2024

With the update of vite to version: 5.2.11 the main.css is no longer on the root level of the manifest.json.

https://vitejs.dev/guide/migration.html#corresponding-css-files-are-not-listed-as-top-level-entry-in-manifest-json-file

to fix it:

add the styles as a new entry point to the vite.build.json

{
  "base": "/var/configurator/app",
  "outDir": "../../public/var/configurator",
  "assetsDir": "assets",
  "profileBuild": "configurator",
  "modes": {
    "app": {
      "input": [
        "./src/main.ts",
        "./src/setup/styles.scss",
        "./src/setup/scss/themes/theme-01.scss"
      ]
    },
    "pimcore": {
      "input": ["./src/pimcore/pimcore.scss"]
    }
  },
  "themeSource": "src/setup/scss/themes/",
  "themeFiles": ["theme-01", "theme-02"]
}

Then it will be exported in the manifest.json on root level as before

ATTENTION: before it was main.css now it would be styles.css -> either take the new wording or refactor the file name

@notsure notsure added bug Something isn't working high priority css Needs changes in the area of CSS labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working css Needs changes in the area of CSS high priority
Projects
Status: To do
Development

No branches or pull requests

2 participants