storybook absolute paths code example
Example 1: 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;
},
}
{
......
"compilerOptions": {
.....
"baseUrl": "./src"
}
}
Example 2: storybook absolute paths
{
...,
"baseUrl": "./src/",
}
Example 3: 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;
},
}