Fail load static in Windows 10
See original GitHub issueHey,
- Installing last vue-cli
- Create a new project
- try to load a static css file (bootstrap)
- Open index.html
- Adding
<style src="/static/oneui/css/bootstrap.min.css" type="text/css"></style>
According to the doc, “/static/*” path will not be process by Webpack.
It will search in assetsPublicPath
+ assetsSubdirectory
, base configuration looking in ‘/static’ folder of project.
It’s look like doesn’t work on Windows (i pretty sure is Windows issue) anyone have a tips ? ❤️
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
IIS fails to load static files over HTTP but works over HTTPS
locked. IIS fails to load static files over HTTP but works over HTTPS RRS feed ... I am on windows 10 and using...
Read more >Windows staticDirs issue - Storybook not loading assets ...
Then when we run npm run start, Storybook starts and appears to be working fine, but none of the static assets can be...
Read more >Django static file is not loading in my computer (windows 10 ...
I've run my project in various computer (windows 10), python 3.7.2, django 2.1.7 In every computer its working properly except mine.
Read more >Re: Django 2.2.6 fails to serve some static files in Windows 10
If I change the setting static_url to STATIC_URL = "static/" the css file is served. However, debug_toolbar ceases to serve her own static...
Read more >Staticfiles error 404 in Django | unable to load CSS or JS
Django unable to load static files like css, javascript, images or etc. In this type of situation, Django occurs 404 error.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh I feel bad ! Thanks for your answer ! Im stupid !
Thanks again !
You have made a mistake: You should include your css by using the
<link>
tag. Rather than using<style src="/static/oneui/css/bootstrap.min.css" type="text/css"></style>
use:The dot in the href will reference the current directory you are in. Since you will write this to the
index.html
i believe you are in the root directory of the project. Then navigate to your css file.Read this source on how the link tag is working.
Edit: Tested on Win10 with newest version available.