How to apply url-loader for stylus urls?
vsorrokin opened this issue · 3 comments
vsorrokin commented
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!
vsorrokin commented
Seems like I understood. Need to set '/../../../static/img/logo.png' URL
petervmeijgaard commented
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...
petervmeijgaard commented
For more information, see https://vue-loader.vuejs.org/en/configurations/asset-url.html