-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19d3df8
commit ca8ed78
Showing
98 changed files
with
19,433 additions
and
39,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,20 @@ | ||
const path = require('path'); | ||
|
||
const appRoot = path.resolve(__dirname, '..'); | ||
|
||
function root() { | ||
const newArgs = Array.prototype.slice.call(arguments, 0); | ||
|
||
return path.join.apply(path, [appRoot].concat(newArgs)); | ||
} | ||
|
||
const plugins = { | ||
// https://github.com/dividab/tsconfig-paths-webpack-plugin | ||
TsconfigPathsPlugin: require('tsconfig-paths-webpack-plugin') | ||
}; | ||
|
||
module.exports = { | ||
stories: [ | ||
'../src/**/*.stories.mdx', | ||
'../src/**/*.stories.@(js|jsx|ts|tsx)' | ||
], | ||
|
||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials' | ||
], | ||
core: { | ||
builder: 'webpack5' | ||
}, | ||
framework: '@storybook/react', | ||
webpackFinal: async (config) => { | ||
// https://github.com/storybookjs/storybook/issues/12019 | ||
config.module.rules[0].use[0].options.plugins = [ | ||
['@babel/proposal-class-properties', { 'loose': true }] | ||
]; | ||
|
||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
use: [{ | ||
loader: 'style-loader', | ||
}, { | ||
loader: 'css-loader', | ||
}, { | ||
loader: 'sass-loader', | ||
options: { | ||
sourceMap: true, | ||
}, | ||
}], | ||
}); | ||
|
||
config.resolve.modules.push(root('src')); | ||
config.resolve.modules.push(root('src', 'style')); | ||
|
||
config.resolve.plugins = [ | ||
new plugins.TsconfigPathsPlugin({ | ||
configFile: root('tsconfig.json') | ||
}), | ||
]; | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {} | ||
}, | ||
|
||
return config; | ||
docs: { | ||
autodocs: true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.