Giter Site home page Giter Site logo

typo3-vite-demo's People

Contributors

felixranesberger avatar fgeierst avatar misterboe avatar ohm-meter avatar peter-neumann-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

typo3-vite-demo's Issues

Assets result in 404 with wrong path

Reproduce
Include a file, for example with url() in SCSS, that will be added to the assets of builds (could also be a problem of assets outside CSS). Both in development mode and productions builds assets have the wrong path resulting in 404.

Example from a background-image:

  • Development: GET https://typo3-vite-demo.ddev.site/packages/typo3_vite_demo/Resources/Private/Images/bg.svg 404
  • Production: GET https://typo3-vite-demo.ddev.site/assets/bg-17e50649.svg 404

Possible solutions

  • use relative paths from source file
  • complete extension path, e.g. typo3conf/ext/typo3_vite_demo/Resources/Private/Images/bg.svg

ViteFluid Plugin breaks routing on dev

While the production build works fine, the development server has a routing issue. When the Vite dev server is active, it intercepts routing requests (user clicks on a link). The requested url shows for a brief split second in the network tab, but no navigation is happening in the browser. The issue seems to be related with the custom file watcher plugin ViteFluid. If the plugin is disabled, clicking on links works again.

image

Dependencies pnpm and tmux missing

Hi,

in the devbox there are the dependencies for pnpmand tmux which are currently not included.
I don't know ddev very well, but there should be a way to set up it on install, isn't it?

Best regards,
André

Remove complexity of loading production assets and use TYPO3 core loading

There were UserFunctions or suggested ViewHelpers to load production assets from ViteJS production builds. This was necessary because they get hashed by default. Since we are using TYPO3, we can reduce the complexity by targeting the core way of including files with following benefits:

  • Removing the hashing of ViteJS builds, because files are also hashed by TYPO3 to ensure loading of new builds with caching enabled – no need for any custom loading by parsing JSON files
  • Keeping the original filenames, and since everything is bundled for production we only will have 2 files (main.js & main.css)
  • Include the files in TypoScript the original core way – TYPO3 core asset handling, JavaScript can be loaded after footer
  • In case of additional bundles (guessing they will not get more than a hand full) we can load them on demand within FluidTemplates (f:asset) or within TypoScript within target pages plugins, or elements

I have prepared a branch with these changes and will create a Pull Request #22 for that (no matter if this will get merged) to have a look at the changes. The assets are bundled to the public folder without any nesting:

├── Resources
│   └── Public
│       ├── main.css
│       └── main.js

Vite file watcher stopped working in DDEV/Colima/Docker Desktop enviroment

For me (MacOS Ventura 13.1, Colima), Vite file watching stopped working. The changes I made in VS code were not synced to the Vite dev server. Only changes I made inside the SSH container with Nano triggered a reload in the browser.
This issue was resolved by setting the DDEV Mutagen option to true. First I suspected colima vm-type=qemu or --vm-type=vz to be the cause, but turns out both options work if Mutagen is enabled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.