babel-plugin-module-resolver
babel-plugin-module-resolver copied to clipboard
Custom module resolver plugin for Babel
I just installed apollo/graphql and added the alias `'@app/graphql': './src/graphql',` for my new graphql related code. For some reason this now transpiles `require('graphql')` statements within node_modules to `../../../../../src/graphql` and causes...
## Motivation With TypeScript 4.7 the ESM world is getting serious: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#esm-nodejs Building an ESM package ("type": "module") requires imports to contain a ".js" at the end. To make this...
In my `tsconfig` I have this: "paths": { "@app/*": ["public/js/app/*"] and in my codebase, I use the imports like: import "@app/test" Everything works fine. But I'm trying to do server...
There are some nuances of the `root` option that are not explained in the README, or even the [docs](https://github.com/tleunen/babel-plugin-module-resolver/blob/master/DOCS.md), for instance: ```jsonc { "plugins": [ ["module-resolver", { "root": ["./src"], //...
My project structure. React-A: - server(Server side redering): babel register. - config-overide react app: config alias for team at right. In the server folder i have a file index.js and...
Once you switch your `package.json` to `type: module`, usage of the this package breaks, including utils such as` babel-node`. Lets say your `.babelrc.cjs` looks like this: ``` module.exports = {...
`.` and `./` are specific paths, we can't transfrom them. There are many projects([example](https://github.com/ant-design/ant-design/blob/master/components/space/Item.tsx#L2)) that use `import xxx from '.' `. Example code: ```javascript // index.js export var name =...
Hi, but the resolver, not work, when using: `import(`@partial/path/alias/${chunk}`)`, this is normal? can add support by this? May be can contribute with a PR fixing this.
Hey all Currently trying to get `jest` mocks working together with this plugin. I have tried different variations of `jest.mock`. Here is my test: ``` js // @flow import mainframeClient...
In my root of project "src", I created two symbolic links: ```sh ln -s Projectxx/src/A src/A ln -s Projectxx/src/B src/B ``` src/A -> Projectxx/src/A src/B -> Projectxx/src/B For example Projectxx/src/A...