I am not able to import a json file. I get the following error message:
Module not found: Error: Can’t resolve ‘json-loader’
I’ve tried both “import filename from ‘@/assets/filename.json’” and “const filename = require(’@/assets/filename.json’)”, but get same error. I can import a js file using the same path.
I’m using email@example.com, firstname.lastname@example.org and email@example.com. Since I am using webpack 4 I should not have to use a loader, so why is it trying to find ‘json-loader’? Is there something specific to using vue with webpack that I’m missing?
I’ve also tried installing json-loader, but then I get a read syntax error.