js-to-styles-var-loader icon indicating copy to clipboard operation
js-to-styles-var-loader copied to clipboard

adds options.type override

Open alycda opened this issue 5 years ago • 2 comments

I'm using Semantic UI Less, and because some of the files processed by less do not contain .less as the extension, the plugin doesn't work for me as expected.

I must import the variables here: https://glitch.com/edit/equinox-motion?path=ui/styles/semantic.less:15:17 so that your loader will know what type of variables to create.

But due to the load order, I need to import the variables here: https://glitch.com/edit/#!/equinox-motion?path=ui/styles/site/globals/site.variables:1 so that they actually override the defaults.

I expect that I will be able to move the require statements to the .variables file and update webpack.config to

{
  loader: "js-to-styles-var-loader",
  options: { type: 'less' }, 
}

alycda avatar Sep 11 '19 19:09 alycda

Please look how I resolved the similar issue in Vue components #10. We can just consider such cases internally without requiring of external configuration

constgen avatar Aug 17 '20 09:08 constgen

Hi, thanks for the contribution, the new version has been published to npm as version 1.2.0.

On Mon, 17 Aug 2020 at 11:36, Constantine Genchevsky < [email protected]> wrote:

Please look how I resolved the similar issue in Vue components #10 https://github.com/tompascall/js-to-styles-var-loader/pull/10. We can just consider such cases internally without requiring of external configuration

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tompascall/js-to-styles-var-loader/pull/9#issuecomment-674774226, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTTKQCDCO4EJCZ37N5WQODSBD22DANCNFSM4IVX3C2A .

tompascall avatar Aug 17 '20 11:08 tompascall