Answer the question
In order to leave comments, you need to log in
How to properly use raw-loader for React+WebPack?
I want to import a text file into a variable. And for this I set: "raw-loader": "^0.5.1",
But none of these options worked:
import cities from './cities.txt';
import cities from '!raw!./cities.txt';
import cities from '!raw./cities.txt';
import cities from 'raw!./cities.txt';
Module not found: Can't resolve 'raw' in ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question