Skip to content

Commit

Permalink
Migrated to storybook3 with the necessary webpack config changes (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
frehner authored and jquense committed Nov 28, 2017
1 parent fd91e81 commit bfc1450
Show file tree
Hide file tree
Showing 5 changed files with 3,025 additions and 2,332 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { configure } from '@kadira/storybook';
import { configure } from '@storybook/react';

function loadStories() {
require('../stories');
Expand Down
27 changes: 16 additions & 11 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const Autoprefixer = require('less-plugin-autoprefix');

module.exports = {
resolve: {
extensions: ['', '.js', '.jsx']
extensions: ['.js', '.jsx']
},
module: {
loaders: [
rules: [
{
test: /\.css?$/,
loaders: [ 'style', 'raw' ],
Expand All @@ -16,7 +16,20 @@ module.exports = {
},
{
test: /\.less?$/,
loader: 'style-loader!css-loader!less-loader',
use: [
'style-loader',
'css-loader',
{
loader: 'less-loader',
options: {
plugins: [
new Autoprefixer({
browsers: ['last 2 versions', 'ie >= 10']
})
]
},
}
],
include: [
path.resolve(__dirname, '../')
]
Expand All @@ -26,13 +39,5 @@ module.exports = {
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'}
]
},

lessLoader: {
lessPlugins: [
new Autoprefixer({
browsers: ['last 2 versions', 'ie >= 10']
})
]
}
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-dom": "^15.3.0 || ^16.0.0"
},
"devDependencies": {
"@kadira/storybook": "^1.28.1",
"@storybook/react": "3.2.16",
"babel-cli": "^6.7.5",
"babel-core": "^6.7.6",
"babel-eslint": "^6.0.2",
Expand All @@ -58,7 +58,7 @@
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-react": "^6.8.0",
"globalize": "^0.1.1",
"less": "^2.7.2",
"less": "^2.7.3",
"less-plugin-autoprefix": "^1.5.1",
"markdown-jsx-loader": "^2.0.1",
"marked": "^0.3.5",
Expand Down
2 changes: 1 addition & 1 deletion stories/Calendar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storiesOf, action } from '@kadira/storybook';
import { storiesOf, action } from '@storybook/react';
import moment from 'moment';
import React from 'react';

Expand Down
Loading

0 comments on commit bfc1450

Please sign in to comment.