Skip to content

Commit 3055c0a

Browse files
committed
Updated everything except redux and ava
1 parent f806e3b commit 3055c0a

13 files changed

+12288
-7982
lines changed

.babelrc

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"env": {
33
"development": {
4-
"presets": ["es2015", "stage-0", "react"]
4+
"presets": ["@babel/preset-env", "@babel/preset-react"],
5+
"plugins": ["@babel/plugin-proposal-class-properties"]
56
},
67
"build": {
7-
"plugins": ["lodash"],
8-
"presets": ["es2015", "stage-0", "react"],
9-
"ignore": [
10-
"**/__tests__/*.js",
11-
"**/fake-*"
12-
]
8+
"plugins": ["lodash", "@babel/plugin-proposal-class-properties"],
9+
"presets": ["@babel/preset-env", "@babel/preset-react"],
10+
"ignore": ["**/__tests__/*.js", "**/fake-*"]
1311
}
14-
1512
}
1613
}

.storybook/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { configure } from '@kadira/storybook';
1+
import { configure } from '@storybook/react';
22

33
function loadStories() {
4-
require('../stories');
4+
require('../stories/index.tsx');
55
}
66

77
configure(loadStories, module);

.storybook/webpack.config.js

+15-39
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,17 @@
1-
const failPlugin = require('webpack-fail-plugin');
2-
const path = require("path");
3-
const include = path.resolve(__dirname, '../');
4-
5-
// you can use this file to add your custom webpack plugins, loaders and anything you like.
6-
// This is just the basic way to add addional webpack configurations.
7-
// For more information refer the docs: https://goo.gl/qPbSyX
8-
9-
// IMPORTANT
10-
// When you add this file, we won't add the default configurations which is similar
11-
// to "React Create App". This only has babel loader to load JavaScript.
12-
13-
module.exports = {
14-
devtool: 'source-map',
15-
entry: './stories/index.tsx',
16-
output: {
17-
filename: include + '/dist/examples/storybook.js'
18-
},
19-
plugins: [
20-
failPlugin
21-
],
22-
resolve: {
23-
// Add `.ts` and `.tsx` as a resolvable extension.
24-
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
25-
},
26-
module: {
27-
loaders: [
28-
{ test: /\.tsx?$/,
29-
loader: 'babel-loader!ts-loader',
30-
exclude: /node_modules/,
31-
cacheDirectory: true,
32-
include,
1+
const path = require('path');
2+
module.exports = (baseConfig, env, config) => {
3+
config.module.rules.push({
4+
test: /\.(ts|tsx)$/,
5+
use: [
6+
{ loader: 'babel-loader' },
7+
{
8+
loader: 'awesome-typescript-loader'
9+
},
10+
{
11+
loader: 'react-docgen-typescript-loader'
3312
}
34-
],
35-
},
36-
ts: {
37-
compilerOptions: {
38-
noEmit: false,
39-
},
40-
},
13+
]
14+
});
15+
config.resolve.extensions.push('.ts', '.tsx');
16+
return config;
4117
};

0 commit comments

Comments
 (0)