I'm authoring a library with a configuration that I want to make customizable by adding a .prtcls.config.js file in the root of the project. When my library gets installed, it exists within the project's node_modules folder.
Even though I can point to the right file for the import, I get the following TS error:
File '/path/to/project/.prtcls.config.js' is not under 'rootDir' '/path/to/project/node_modules/prtcls'. 'rootDir' is expected to contain all source files.ts(6059)
Here's the tsconfig in the /node_modules/prtcls folder:
{
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"checkJs": true,
"declaration": true,
"incremental": true,
"target": "ESNext",
"rootDir": "./",
// "baseUrl": "./",
"outDir": "dist/",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"importHelpers": true,
"forceConsistentCasingInFileNames":true,
"removeComments":true,
"strict":true,
},
"include": ["../../.prtcls.config.js", "**/*.js"],
// "exclude": ["dist/"]
"exclude": ["node_modules", "lib", "tests"]
}
Is there any way to import the object that would be exported from /path/to/project/.prtcls.config.js?