question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail load static in Windows 10

See original GitHub issue

Hey,

  • 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:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
totomakerscommented, Feb 5, 2017

Oh I feel bad ! Thanks for your answer ! Im stupid !

Thanks again !

1reaction
igeligelcommented, Feb 4, 2017

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:

<link href="./static/oneui/css/bootstrap.min.css" rel="stylesheet" type="text/css">

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found