Hey guys,
This issue's been absolutely bugging me but I've been trying to add a simple .js file to use in one of my templates. Here are the steps I've followed:
- Create
pce.js(my chosen name) in resources/js/ - Add a
function test(){ console.log('test'); };into that file. - Add
@vite(['resources/js/pce.js'])to the top of my blade.php file - Add
"resources/js/pce.js"to theinputsection under my vite.config.js - Run
npm run build - Get empty chunk output for pce.js (SS attached)
I don't know what on earth is going on. I've been googling for the past 15 minutes and can't find anything. Any help would be greatly appreciated.