Tuesday 16 May 2017

Webpack raw loader from from public path?

I am currently using the webpack raw loader to load a file like so:

import svg from '!!raw-loader!./../../public/images/svg/project/flag.svg';

I am using this with Vue.js and I would like to create a method, mixer or plugin to resolve automatically to my public path.

How can I make the raw loader start from the root of my project instead of building up a relative path?



via Stephan-v

No comments:

Post a Comment