In my ReactNative project there are some static text files which i'd like to load into a string variable. Like this way:
var content = loadPlainTextFile("resources/tags.txt");
var tags = content.split("\n");
I tried require in the same way i'm requiring javascript files, but it doesn't work because react native gives exception "Unable to resolve module ./data/tags.txt".
var customData = require('./data/tags.txt');
I guess that require() is not able to handle plain text files?
How to do correctly?
tags.txt
fileexport default "some useful text"
but we are loosing the type, and syntax highlighting, which is a shame. Example of some useful extensions:config.yml
query.grapql
shader.glsl