<< Back to previous view

[DEMO-3] css2json-loader and export
Created: 25/Feb/20  Updated: 25/Feb/20

Status: Open
Project: Demo
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Steve Luo Assigned To: Steve Luo
Resolution: Unresolved Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
In my app i do something like this is sass

$primary-color: #2196F3;
:export {
    primaryColor: $primary-color;
  }
The idea is to be able to require within javascript like this

import { locals } from '~/variables.scss';
export const primaryColor: string = locals.primaryColor;
Now primaryColor is available everywhere.

However this works when i use css-loader but not when i use nativescript-dev-webpack/css2json-loader.
Do you have any idea on how i can make it work
Generated at Thu Apr 18 21:40:52 UTC 2024 using JIRA 189.