Missing code example on "Add Bedrock Styles and JavaScript" document?

I think a code example should have existed here but it seems deleted at some time.

main.js

Now let’s do something similar for main.js. Open assets/js/main.js, and add the following to it:

Re-run npm run production, and it should result in a (slightly) larger main.js than before as well.

Someone please, check the history of this page

2 Likes

Hi @hissy
I checked the version.


Where should I add the code sample?

1 Like

Thanks @jessicadunbar , then what should I add to main.js? Do you know?

Hello @jessicadunbar and @hissy I’m also following this tutorial and came across the missing code example. Did either of you know what this should be or where I can find the missing snippet? Many thanks

1 Like

Thank you for the reminder. I am pinging engineering and will follow up.

I’ve added the missing code sample to the page. It should be this line:

import '@concretecms/bedrock/assets/bedrock/js/frontend';
3 Likes