Skip to content

[Laravel Vite] Specifying (splitting) .css and .js files for each page #44578

Closed Answered by czernika
XenBG asked this question in Ideas
Discussion options

You must be logged in to vote

Yes you can. Both Vite input and output are handled by rollupOptions section but laravel-vite helps you with input options

Assuming you have this assets structure

├── resources
│   ├── sass
│   │   ├── pages
│   │   │   ├── about.scss
│   │   │   ├── contacts.scss
│   │   │   ├── home.scss
│   ├── js
│   │   ├── pages
│   │   │   ├── about.js
│   │   │   ├── contacts.js
│   │   │   ├── home.js

you can create entries from pattern like it described here

If you want to convert a set of file to another format while maintaining the file structure and export signatures, the recommended way—instead of using output.preserveModules that may tree-shake exports as well as emit virtual files create…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@WA-MB
Comment options

@XenBG
Comment options

@WA-MB
Comment options

@Capati
Comment options

Answer selected by XenBG
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants