Hello. I’m trying to write a webpack application that acts on a set of files that exist just outside of the directory where webpack lives. For example one of the require statements in ‘index.js’ webpack entry script refers to ‘../config.json’. Doing that gives me an error similar to the following:
ERROR in ./index.js Module not found: Error: Cannot resolve 'file' or 'directory' ../config.js in /Users/frank-weindel/Documents/Working/Data Transition/Data Schema/webpack @ ./index.js 14:0-30
Relative to the webpack root, that file does in fact exist.
I’ve even tried it using absolute paths, but the same error occurs.
The reason I want to do it this is to keep the webpack application logically separated from the data its trying to use. This data (its a JSON schema) should live on its own.
Is this possible with webpack? Or is it purposefully restricting access to files outside its root?