diff --git a/packages/react-bootstrap-table2-example/.storybook/.babelrc b/packages/react-bootstrap-table2-example/.storybook/.babelrc index 9683237..3feddd3 100644 --- a/packages/react-bootstrap-table2-example/.storybook/.babelrc +++ b/packages/react-bootstrap-table2-example/.storybook/.babelrc @@ -1,3 +1,4 @@ { - "presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]] + "presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]], + "plugins": ["transform-class-properties"] } \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index a837384..166aef5 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -1,10 +1,10 @@ const path = require('path'); -const sourcePath = path.join(__dirname, '../../react-bootstrap-table2'); -const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator'); -const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay'); -const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter'); -const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor'); +const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/index.js'); +const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/index.js'); +const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay/index.js'); +const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter/index.js'); +const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/index.js'); const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style'); const storyPath = path.join(__dirname, '../stories'); @@ -33,8 +33,7 @@ const loaders = [{ }, { test: /\.js?$/, use: ['babel-loader'], - exclude: /node_modules/, - include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath] + exclude: /node_modules/ }, { test: /\.css$/, use: ['style-loader', 'css-loader'], diff --git a/packages/react-bootstrap-table2-example/package.json b/packages/react-bootstrap-table2-example/package.json index cff2cd4..169e3db 100644 --- a/packages/react-bootstrap-table2-example/package.json +++ b/packages/react-bootstrap-table2-example/package.json @@ -23,6 +23,7 @@ "devDependencies": { "@storybook/addon-console": "^1.0.0", "@storybook/react": "^3.2.8", + "babel-plugin-transform-class-properties": "6.24.1", "babel-preset-env": "^1.6.1", "react-redux": "^5.0.6", "redux": "^3.7.2", diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 0f53da7..8037edb 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -96,8 +96,8 @@ import RemoteAll from 'examples/remote/remote-all'; import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/tomorrow.min.css'; import 'stories/stylesheet/storybook.scss'; -import 'react-bootstrap-table2/style/react-bootstrap-table2.scss'; -import 'react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss'; +import '../../react-bootstrap-table2/style/react-bootstrap-table2.scss'; +import '../../react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss'; // import { action } from '@storybook/addon-actions';