-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack publicPath configured incorrectly for production builds? #119
Comments
This is a non-issue, and just about directory structure preference. I prefer to put all static resources into a Notice that all js and css files will bundle into Another thing worth to mention here is that |
I think I may have not been clear enough. The problem is that |
@jhen0409 yes exactly and that's why |
Just chiming in to say that this should probably count as an issue – everyone using assets will bump into this and need to change the path, even if everything is in Since packaged assets are not requested from a server, files that are compiled to As @pascalw is saying, with |
@chentsulin sent a PR that fixes this. |
@pascalw Cheers! I was about to do the same thing. We've already put more effort discussing it than the correction requires :) |
…roduction Close #119, Fix Webpack publicPath for production builds
My bad. Thanks @pascalw ! |
I'm new to Webpack so I could be wrong but; I'm including font-awesome in my project and noticed that in production builds the icons would not work, because it tried to load the icon files from
/dist/...ttf
.Looking at the
webpack.config.production.js
I noticed this snippet which I think is incorrect:config.output.publicPath = '/dist/';
Setting that to
../dist/
fixes my problem with font-awesome. Looking at the Webpack docs I think this indeed should be../dist/
because we're not running a server in production builds.Do you want me to send a PR for that?
The text was updated successfully, but these errors were encountered: