Skip to content

Commit

Permalink
Handle npm modules which include es6
Browse files Browse the repository at this point in the history
  • Loading branch information
haruelrovix committed Dec 9, 2018
1 parent cd781f7 commit 8c0e603
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ module.exports = {
// Process JS with Babel.
{
test: /\.(js|jsx|mjs)$/,
include: paths.appSrc,
include: [
paths.appSrc,
`${paths.appNodeModules}/react-native-elements`,
`${paths.appNodeModules}/react-native-vector-icons`
],
loader: require.resolve('babel-loader'),
options: {

Expand Down
6 changes: 5 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ module.exports = {
// Process JS with Babel.
{
test: /\.(js|jsx|mjs)$/,
include: paths.appSrc,
include: [
paths.appSrc,
`${paths.appNodeModules}/react-native-elements`,
`${paths.appNodeModules}/react-native-vector-icons`
],
loader: require.resolve('babel-loader'),
options: {
// The 'react-native' preset is recommended to match React Native's packager
Expand Down

3 comments on commit 8c0e603

@MustafaAnasKH99
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not needed anymore?
I do not get errors when I install the RNE and RNVI

@haruelrovix
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MustafaAnasKH99 it’s been months since I wrote the tutorial. What’s RNE and RNVI version you’re using?

"react-native-elements": "^1.0.0-beta7",
"react-native-vector-icons": "^6.1.0",

here

@yuxiaomin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MustafaAnasKH99 it’s been months since I wrote the tutorial. What’s RNE and RNVI version you’re using?

"react-native-elements": "^1.0.0-beta7",
"react-native-vector-icons": "^6.1.0",

here

"react-native-elements": "^1.1.0",
"react-native-vector-icons": "^6.6.0",

No need to modify webpack config now.

Please sign in to comment.