Closed Rajdeepc closed 6 months ago
Ok I figured out that it can be written as
import StyleDictionary from 'style-dictionary'
const styleDictionary = StyleDictionary.extend( 'config.js' );
But I have written this line in build-css.js and this is my file structure build-css.js config.js
But I am getting this error
Error: Cannot find module '/Users/rajdeepc/Documents/Projects/project/config.js'
v4 has first-class ESM support, see https://github.com/amzn/style-dictionary/blob/v4/CHANGELOG.md
How to write the below line in ES6 Module
CommonJS: const StyleDictionary = require('style-dictionary').extend('config.json');
ES6??