Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
ailsa wang
Courses Plus Student 1,791 Pointshow to include babel in pug?
is there a way to include the babel file in pug? i tried script(src='../../public/scripts/bundle.js' type='text/babel') , but this won't work. do i need to install any plugin? byw, pug is so confusing!!!
1 Answer
Daniel Gonzalez
22,105 PointsHi Ailsa,
Are you using node.js? Below is how I add my script tags on pug. You do not need to install a plug-in but also check the console in your browser to make sure you are using the correct path in src. In the example below my js file is located inside the public directory.
script(type='text/javascript', src="/js/app.js")