Reputation: 85
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?
Upvotes: 1
Views: 2248
Reputation: 9368
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.
Upvotes: 1