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

Placeholder does not resolve #32

Closed
ochorocho opened this issue Dec 5, 2023 · 1 comment
Closed

Placeholder does not resolve #32

ochorocho opened this issue Dec 5, 2023 · 1 comment

Comments

@ochorocho
Copy link
Contributor

The placeholder %vite('assets/rte.css')% does not return a CSS file as expected.

Ich returns only the file which is JS:
https://github.com/s2b/vite-asset-collector/blob/main/Classes/Service/ViteService.php#L139-L140

RteDefaultPreset.yaml

editor:
  config:
    # Include custom CSS
    contentsCss: "%vite('assets/rte.css')%" # <<< DOES NOT RESOLVE

manifest.json

...
  "assets/rte.js": {
    "assets": [
      "assets/Share-Regular-McM9bfXV.ttf"
    ],
    "css": [
      "assets/rte-jfN4x0Xs.css" # <<< NO IDEA, HOW TO GET THIS FILE
    ],
    "file": "assets/rte-4EM0ud4N.js",
    "isEntry": true,
    "src": "assets/rte.js"
  }
...

The issue reported for the TYPO3 Template repository:
https://gitlab.com/gitlab-org/project-templates/typo3-distribution/-/issues/23

Bildschirmfoto_2023-12-05_um_17 00 15
@ochorocho
Copy link
Contributor Author

To fix this issue do the following:

editor:
  config:
    # Include custom CSS
    contentsCss: "%vite('assets/Scss/rte.scss')%"
const VITE_ENTRYPOINTS = [
  "assets/app.js",
  "assets/Scss/rte.scss", // Use the scss file as entrypoint instead of rte.js
];

For more details see vitejs/vite#15161

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

No branches or pull requests

1 participant