This repo is forked from tompascall/js-to-styles-var-loader and change some contents to meet my need.
The changes are as follows:
- change the
require
sentence.
previous:
require('vars.js');
current:
@import 'vars.js';
- support resolve
node_modules
and webpackresolve.alias
directories. Just prepend them with a~
.
@import '~themes/vars.js';
- optimize
getPreprocessorType
. Use webpackresourcePath
to analyze resource type, ignore resource query part.
previous, it not support:
import 'style.less?local';
but now, it can support above.