I'm a fan of encapsulation and tend towards writing new CSS and Javascript as modular and component based.
For example, the script.js file should be a collection of import statements of any modular files in the /resources/scripts/ folder. If I review the scripts file, I'd see something like this:
import { feature } from './feature-file.js';
import { feature2 } from './feature2-file.js';
feature();
feature2();
Right now, the way that Vite builds the project, this doesn't work right.
I'm a fan of encapsulation and tend towards writing new CSS and Javascript as modular and component based.
For example, the
script.jsfile should be a collection ofimportstatements of any modular files in the/resources/scripts/folder. If I review the scripts file, I'd see something like this:Right now, the way that Vite builds the project, this doesn't work right.