Skip to content

Commit 2263282

Browse files
committed
tweak storybook webpack
1 parent a2d082b commit 2263282

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]]
2+
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]],
3+
"plugins": ["transform-class-properties"]
34
}

packages/react-bootstrap-table2-example/.storybook/webpack.config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const path = require('path');
22

3-
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2');
4-
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator');
5-
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay');
6-
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter');
7-
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor');
3+
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/index.js');
4+
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/index.js');
5+
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay/index.js');
6+
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter/index.js');
7+
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/index.js');
88
const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style');
99
const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style');
1010
const storyPath = path.join(__dirname, '../stories');
@@ -33,8 +33,7 @@ const loaders = [{
3333
}, {
3434
test: /\.js?$/,
3535
use: ['babel-loader'],
36-
exclude: /node_modules/,
37-
include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath]
36+
exclude: /node_modules/
3837
}, {
3938
test: /\.css$/,
4039
use: ['style-loader', 'css-loader'],

packages/react-bootstrap-table2-example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"devDependencies": {
2424
"@storybook/addon-console": "^1.0.0",
2525
"@storybook/react": "^3.2.8",
26+
"babel-plugin-transform-class-properties": "6.24.1",
2627
"babel-preset-env": "^1.6.1",
2728
"react-redux": "^5.0.6",
2829
"redux": "^3.7.2",

packages/react-bootstrap-table2-example/stories/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ import RemoteAll from 'examples/remote/remote-all';
9696
import 'bootstrap/dist/css/bootstrap.min.css';
9797
import 'stories/stylesheet/tomorrow.min.css';
9898
import 'stories/stylesheet/storybook.scss';
99-
import 'react-bootstrap-table2/style/react-bootstrap-table2.scss';
100-
import 'react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss';
99+
import '../../react-bootstrap-table2/style/react-bootstrap-table2.scss';
100+
import '../../react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss';
101101

102102
// import { action } from '@storybook/addon-actions';
103103

0 commit comments

Comments
 (0)