petervmeijgaard/vue-2-boilerplate

How to apply url-loader for stylus urls?

vsorrokin opened this issue · 3 comments

Your boilerplate is great! I have a question:

I wrote in src/assets/styles/app.styl this:

.logo {background-image: url('/static/img/logo.png')}

But seems like it is not affected with webpack url-loader - I expected hashed url in builded project, but it is not. Can you please give the example about how to correctly configure webpack to apply url-loader for urls inside .styl files? Thank you!

Seems like I understood. Need to set '/../../../static/img/logo.png' URL

Glad you figured this problem out on your own! You can also place the image in the assets directory and use url('~@/assets/img/logo.png') if I'm correct...