-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It doesn't resolve paths to files #424
Comments
Have you found a solution? |
For me it doesn't work in a simplest use case. module.exports = {
presets: [['@babel/preset-env'], ['@babel/preset-react'], ['@babel/preset-typescript']],
plugins: [
[
'module-resolver',
{
root: ['./src'],
},
],
'@babel/plugin-proposal-class-properties',
],
}; This doesn't rewrite paths like |
Ok, it should be instead: module.exports = {
presets: [['@babel/preset-env'], ['@babel/preset-react'], ['@babel/preset-typescript']],
plugins: [
[
'module-resolver',
{
root: ['./src'],
extensions: ['.ts', '.tsx'],
},
],
'@babel/plugin-proposal-class-properties',
],
}; Note the Kudos to @jb from SpeakJS discord community for the solution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use the plugin for css, graphql file mocks in order to run nodejs on tests.
It seems it should work as it specified in the description:
Nevertheless, what I'm getting is that actual file path is preserved.
My configuration:
The text was updated successfully, but these errors were encountered: