I have a Typescript app building with RSPack that leverages some options that are configurable via a local json file, let’s call it local-config.json
. There’s a line that attempts to import those configuration options like so:
const localConfig = import('./local-config.json')
When I run the rspack
command to build the assets, I get the following error:
ERROR in ./path/to/file/location/index.ts
× Resolve error: Can't resolve './local-config.json' in 'path/to/file/location'
I’m wondering if there’s a way I can tell RSPack to not try to resolve that specific file or to skip this check in that block of code?
I’ve tried looking through the various options in RSPack, like the Rules, but I don’t see options that specifically allow me to do what I’m trying to do here.