Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

storybook absolute paths

const path = require('path');
module.exports = {
  ...other settings....,

  webpackFinal: async (config) => {
    config.resolve.modules = [
      ...(config.resolve.modules || []),
      path.resolve(__dirname, "../src"),
    ];

    return config;
  },

}

// Then add this in your tsconfig.json/jsconfig.json
{
......
    "compilerOptions": {
        .....
        "baseUrl": "./src"
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #storybook #absolute #paths
ADD COMMENT
Topic
Name
3+2 =