Skip to content

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

@DarrenXu94

Description

@DarrenXu94

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions