Webpack Including JavaScript File via Tag

Multi tool use
Webpack Including JavaScript File via <script> Tag
I'm using Webpack with Storybook and need to include a JavaScript library file in an HTML file via a script
tag. Unfortunately, I get a 404 error indicating that the file was not found (the file's path is based on my local filesystem and is correct). How do I inform Webpack regarding where to look for my library or "static" files?
script
1 Answer
1
Add files in entry object in webpack.config.js
entryPoint = {
app: ['path/to/script', 'path/to/script2','./index.js'],
};
This will make sure that you have the library loaded when you have run index.js (entry point of project).
More on Webpack entry points.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thank you for the response! Unfortunately, the exact files might be determined dynamically - meaning it would be ideal if I could specify beforehand, "include this directory and all of its subdirectories". Is this possible? Thanks again!
– James
Jul 3 at 14:01