-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Serving assets in npm start #232
Comments
+1, was fighting to get fonts being loaded from |
the assets folder should be copied over to |
1)So I need to copy /src/assets/ to dist/assets manually each time I change smth in assets folder? |
Hi, I am experiencing the same issue as RemKolomna. Downloaded a (fresh) Webpack starter, installed it by running ‘npm install’ (with no issues at all). I started it with ‘npm start’ with Webpack reporting that the bundle is valid. When accessing localhost:3000, I cannot access the icons: http://localhost:3000/assets/icon/favicon-16x16.png -> 404 I am running Windows 10, with Node version 4.2.3 and npm version 2.14.7. I didn’t had any problems prior to copy-webpack-plugin and am thinking that it might be the cause of this issue. |
Does anyone know why the whole src directory is accessible under dist? The CopyWebpackPlugin does nothing! |
Actually, CopyWebpackPlugin works. According to setup it runs when you do 'npm run build:dev' but not when you 'npm start'. But the problem is there anyway - even if img file is copied to dist webserver returns 404. And this is really the big unknown for me... |
so the problem was that webpack-dev-server was serving |
I added to this starter image to /src/assets/img/test.png
After launching "npm start" the address
localhost:3000/assets/img/test.png is inaccessible, but address
localhost:3000/src/assets/img/test.png is working.
Which url should I set in image tag inside my html template?
The text was updated successfully, but these errors were encountered: