Hello,
I think it must be something simple, but while migrating a Sage9 based theme to build with Bud, I’m running into an issue where the JavaScript does not execute. I’ve simplified things completely with only an alert, but it still does not execute.
Any tips would be much appreciated!
Setup is
bud.config.yml
setPath:
- '@src'
- 'resources/assets'
entry:
- app
- ['scripts/main.js', 'styles/main.scss']
scripts/main.js
function sayHello() {
alert("this is my code here");
}
sayHello();
app.js (compiled)
(self.webpackChunk_roots_bud=self.webpackChunk_roots_bud||[]).push([[524],{"./scripts/main.js":()=>{alert("this is my code here")},"./styles/main.scss":()=>{}},s=>{var e=e=>s(s.s=e);e("./scripts/main.js"),e("./styles/main.scss")}]);
app.js is loaded by the page but the alert does not execute. I can see that Bud is wrapping things but am not certain how to trigger the code that it wraps.
Many thanks in advance.
Best