toolbox-loader icon indicating copy to clipboard operation
toolbox-loader copied to clipboard

extra character at the beginning of theme file read in

Open RangeW opened this issue 9 years ago • 1 comments

got this error when using toolbox-loader to load theme scss file replacement. Invalid CSS after "...building: true;": expected 1 selector or at-rule, was "@mixin font-face($"

there's an extra character in front of "@mixin font", checked the original file, nothing there. looks like fs.readfile added it. added this code does the fix:

theme = theme.replace(/^\uFEFF/, '');

it's on windows platform, though. any suggestion on fixing it without code change?

RangeW avatar Jun 27 '16 00:06 RangeW

Hi! I'll be happy to merge a PR solving it but you have to know that toolbox-loader is actually no longer needed. You can now customize in multiple ways but the most similar is to provide the sass imports using sass-loader options. Please check react-toolbox docs or the example react-toolbox-example to update.

javivelasco avatar Jul 04 '16 19:07 javivelasco