#how can i tell sb where main.js is?
1 messages · Page 1 of 1 (latest)
We document all CLI options here: https://storybook.js.org/docs/vue/api/cli-options
Looks like -c will do what you need.
Where I can have a main.js example with React/Next/Typescript/Sass for 7.0.0? Mine is not working:
const babelPresetTypescript = require('@babel/preset-typescript');
module.exports = {
stories: ['../src/**/*.stories.@(js|jsx|tsx|mdx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-links', '@storybook/addon-actions'],
framework: {
name: '@storybook/nextjs',
options: {},
},
babel: async (options) => {
return {
...options,
presets: [...options.presets, babelPresetTypescript],
};
},
webpackFinal: async (config, { configType }) => {
config.module.rules.push({
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
},
},
],
});
return config;
},
docs: {
autodocs: true,
},
};
Error is:
ERR! TypeError: [BABEL]: (0 , _helperPluginUtils.declarePreset) is not a function (While processing: /Users/phoenix/Projects/forPhoenix/node_modules/@babel/preset-env/lib/index.js)