mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-17 12:19:52 +08:00
Update storybook dependencies
This commit is contained in:
@@ -8,15 +8,17 @@
|
||||
"release": "yarn build && git checkout gh-pages && rm -rf ../storybook && mv dist ../storybook && git add -A && git commit -m \"Storybook deploy\" && git push origin gh-pages && git checkout -"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-options": "^3.3.6",
|
||||
"@storybook/react": "^3.3.6",
|
||||
"@storybook/addon-options": "^3.4.3",
|
||||
"@storybook/react": "^3.4.3",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-native-web": "0.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-react-native-web": "0.6.1",
|
||||
"url-loader": "^0.6.2",
|
||||
"webpack": "^3.10.0"
|
||||
"react": "^16.3.2",
|
||||
"react-dom": "^16.3.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ setOptions({
|
||||
name: 'React Native Web',
|
||||
url: 'https://necolas.github.io/react-native-web',
|
||||
goFullScreen: false,
|
||||
showLeftPanel: true,
|
||||
showDownPanel: false,
|
||||
addonPanelInRight: false,
|
||||
showSearchBox: false,
|
||||
downPanelInRight: false
|
||||
showAddonPanel: false,
|
||||
showStoriesPanel: true
|
||||
});
|
||||
|
||||
function loadStories() {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = (storybookBaseConfig, configType) => {
|
||||
const DEV = configType === 'DEVELOPMENT';
|
||||
|
||||
module.exports = storybookBaseConfig => {
|
||||
storybookBaseConfig.module.rules.push({
|
||||
test: /\.(gif|jpe?g|png|svg)$/,
|
||||
use: {
|
||||
@@ -12,11 +10,11 @@ module.exports = (storybookBaseConfig, configType) => {
|
||||
}
|
||||
});
|
||||
|
||||
storybookBaseConfig.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
|
||||
})
|
||||
);
|
||||
storybookBaseConfig.resolve.extensions = ['.web.js', '.js', '.json', '.web.jsx', '.jsx'];
|
||||
|
||||
storybookBaseConfig.resolve.alias = {
|
||||
'react-native': 'react-native-web'
|
||||
};
|
||||
|
||||
return storybookBaseConfig;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user