Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated to storybook3 with the necessary webpack config changes #628

Merged
merged 1 commit into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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