Closed
Description
Moved from vuejs/vue#7400
What problem does this feature solve?
Basically today I noticed that webpack aliases work properly for import statements, however not with <style> </style> section of .vue component. Example given: '@': './src' alias works fine with import smth from '@/smth' in <script> </script> section, but when i tried this: <style> .jumbotron { background: url('@/assets/images/welcome.jpg') center / cover; } </style>
it failed, I thought it would be great to be able to write code this way, so Component.vue works even if its location changes. That would be super cool. Btw I love Vue, thanks a lot for a great work!
**webpack aliases for .vue <style></style> section
What does the proposed API look like?
<style> .jumbotron { background: url('@/assets/images/welcome.jpg') center / cover; } </style>