Skip to content
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

Include tsconfig-paths-webpack-plugin for relative paths #43

Open
DarrenXu94 opened this issue Aug 30, 2021 · 0 comments
Open

Include tsconfig-paths-webpack-plugin for relative paths #43

DarrenXu94 opened this issue Aug 30, 2021 · 0 comments

Comments

@DarrenXu94
Copy link

Add tsconfig-paths-webpack-plugin.

Updated .storybook/main.js folder to allow for paths defined in the tsconfig.json

config.resolve.plugins = [
      new TsconfigPathsPlugin({
        configFile: path.resolve(__dirname, "../tsconfig.json"),
      }),
    ];

tsconfig.json

"paths": {
      "~/*": ["./*"]
    },

This will allow you to import from "~/src"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant