babel-tape-runner
babel-tape-runner copied to clipboard
Json loader
How to integrate babel-type-runner with json-loader to be able to run test on sources which are loaded through json-loader (like webpack does)? Maybe there is a way to mock this somehow?
in sources import config from "!json!../../cfg/config.json"; when I run test through babel-type-runner Error: Cannot find module '!json!../../cfg/config.json'
@niedomnie you can import .json files like you do with .js files. Node has supported this for a long time.
@brigand Problem is that this is on browser side - so I cannot use require and NodeJS does not serve me that feature.