Open atherdon opened 5 years ago
module resolver returns just full path to file that is stored on hdd.But the reason to use es5 it's due to require. that give to it path and returns object. But to make easier to use module resolver I have add filesObject.js that return array with all data
Can we replace right now
const grocery = path.resolve(__dirname, './src/data/Grocery/grocery.json')
with
const grocery = path.resolve(__dirname, '~/Grocery/grocery.json')
without crashing everything? Don't do it - just tell what do you think
I think we can replace but I am a little doubte. ~ alias is working in es6 fine. But will it be working in es5 I don't test it.
ok, i think it can be a good task for someone else. i think all is clear and we don't need to spend time on it.
When I'm looking at this file, i see a long path resolving each time. https://github.com/GroceriStar/sd/blob/master/files.js But we have a module resolver, that aiming to simplify including of files. Am I right that module resolving not working well for this file, or maybe we just forget to use it? Please advice.