bholloway/resolve-url-loader

What settings are needed to set source path to a specific location?

redfox05 opened this issue · 4 comments

Hi,

Not exactly sure how to phrase this, so bear with me.
I'm trying to use this package in order to fix the path problems im having while using a 3rd party theme together with my webpack setup. The 3rd party theme assumes the base .scss file is in a specific folder /myapp/frameworks/3rdpartytheme/custom/custom-styles.scss, and thus all the other imported scss files have their url() definitions referenced to this specific base path.

Here comes my problem. In order for us to easily be able to update this 3rd party dependancy folder (not in node_modules btw), we need to put any customization of variables in a directory outside of the 3rd party folder, which would be completely overwritten on an update. So we place our .scss file in /myapp/assets/custom-styles.scss and this file then @imports the theme files. Works fine for the actual theme as long as there are no url() references.

It seems what we need is in-between webpack assuming the root file is base, and resolve-url-loader assuming the source the line of code is in is the base.

Without rambling on, does this make sense, and any suggestions on where I should focus my reading to implement something to make this scenario work? I tried looking at the custom join function, but not sure if this is the right place.

I have posted a similar question on StackOverflow and also found #129 interesting, but im not sure if mine is the same issue.

Released resolve-url-loader@4.0.0-beta.1.

To reiterate, I think you would be in a much better position if you can adopt the beta and refer to the much improved docs for V4.

The V4 docs are now quite mature so please take a look there.

I'm going to close this issue for now. Let's reopen if you wish to discuss further.