Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb0dd7c

Browse files
committed
configure storybook with emotion
1 parent7f275bf commitfb0dd7c

File tree

6 files changed

+2421
-680
lines changed

6 files changed

+2421
-680
lines changed

‎.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module.exports = {
1515
'@typescript-eslint/no-explicit-any':'off',
1616
'@typescript-eslint/ban-ts-ignore':'off',
1717
'@typescript-eslint/no-unused-vars':'off',
18-
'@typescript-eslint/camelcase':'off',
18+
'@typescript-eslint/camelcase':'off',
19+
'react/forbid-component-props':[1,{forbid:['style']}],
20+
'react/forbid-dom-props':[1,{forbid:['style']}],
1921
},
20-
};
22+
}

‎web-app/.storybook/.babelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎web-app/.storybook/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import{configure}from'@storybook/react'
2-
import'../src/styles/index.css'
2+
//import '../src/styles/index.css'
33

44
// setup acquireVsCodeApi mock
55
//@ts-ignore

‎web-app/.storybook/webpack.config.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
constpath=require('path')
2+
constMiniCssExtractPlugin=require('mini-css-extract-plugin')
23

34
// see typescript setup
45
// https://storybook.js.org/docs/configurations/typescript-config/
56
module.exports=({ config})=>{
67
config.module.rules.push({
78
test:/\.scss$/,
8-
use:['style-loader','css-loader','sass-loader'],
9+
use:[MiniCssExtractPlugin.loader,'css-loader','sass-loader'],
910
include:path.resolve(__dirname,'../'),
1011
})
1112
config.module.rules.push({
1213
test:/\.(ts|tsx)$/,
1314
loader:require.resolve('babel-loader'),
1415
options:{
15-
presets:[['react-app',{flow:false,typescript:true}]],
16+
plugins:[
17+
[
18+
'babel-plugin-import',
19+
{
20+
libraryName:'@alifd/next',
21+
style:true,
22+
},
23+
],
24+
],
25+
presets:[['react-app',{flow:false,typescript:true}],['@emotion/babel-preset-css-prop']],
1626
},
1727
})
28+
29+
config.plugins.push(newMiniCssExtractPlugin({filename:'[name].css'}))
30+
1831
config.resolve.extensions.push('.ts','.tsx')
1932

2033
config.resolve.modules=['node_modules',path.resolve(__dirname,'../src')]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp