[Vuejs]-Webpack encore symfony with VueJS SFC file into style part with css url file path

0👍

My technical context do not help me to easily understand what is wrong.
Because one component VueJS is used by Storybook AND Symfony with 2 differents webpack config.

But I solve my issue thank to 2 thinks :

  • first for symfony part : use the ~ character into begin of my url resource file

    background-image: url('~/assets/images/lopitofuritarus.jpg')

  • second for storybook part : do not use file-loader with css-loader

    test: /.(png|jpe?g|gif)$/i,
    use: [{loader: 'file-loader'}],

Perhaps it can help someone…

Leave a comment