Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 45 additions & 42 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,52 @@

const path = require('path');

module.exports = {
plugins: [
// your custom plugins
],
module: {
rules: [
// add your custom rules.
{
test: /\.js$/,
include: [
path.resolve(__dirname, '../node_modules/react-native/'),
path.resolve(__dirname, '../node_modules/react-native-elements/'),
path.resolve(__dirname, '../node_modules/react-native-ratings/'),
path.resolve(__dirname, '../node_modules/react-native-vector-icons/'),
],
use: {
loader: 'babel-loader',
options: {
cacheDirectory: false,
presets: [
['module:metro-react-native-babel-preset', { 'disableImportExportTransform': true }]
],
plugins: [
// needed to support async/await
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties'
module.exports = ({ config }) => {
config.module.rules.push(
// add your custom rules.
{
test: /\.js$/,
include: [
path.resolve(__dirname, '../node_modules/react-native/'),
path.resolve(__dirname, '../node_modules/react-native-elements/'),
path.resolve(__dirname, '../node_modules/react-native-ratings/'),
path.resolve(__dirname, '../node_modules/react-native-vector-icons/')
],
use: {
loader: 'babel-loader',
options: {
cacheDirectory: false,
presets: [
[
'module:metro-react-native-babel-preset',
{ disableImportExportTransform: true }
]
}
],
plugins: [
// needed to support async/await
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties'
]
}
},
// loader for png
{
test: /\.(gif|jpe?g|png|svg)$/,
use: {
loader: 'file-loader'
}
},
// loader for font icons
{
test: /\.ttf$/,
loader: 'url-loader',
include: path.resolve(__dirname, '../node_modules/react-native-vector-icons/'),
}
],
},
},
// loader for png
{
test: /\.(gif|jpe?g|png|svg)$/,
use: {
loader: 'file-loader'
}
},
// loader for font icons
{
test: /\.ttf$/,
loader: 'url-loader',
include: path.resolve(
__dirname,
'../node_modules/react-native-vector-icons/'
)
}
);

return config;
};