Skip to content

Commit

Permalink
fix can not render in weixin browser
Browse files Browse the repository at this point in the history
reason: (1) babel-polyfill confict with other dependence lib that all compiled by webpack config
        (2) fix the exclude config for the react-nav-bar and other dependence lib
reference:
  https://github.com/react-native-community/react-native-navbar#usage-with-webpack
  webpack/webpack#2031
  • Loading branch information
eastonqiu committed Jul 30, 2016
1 parent a851353 commit dc91a85
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,14 @@ module.exports = {
include: [config.paths.src],
exclude: [/node_modules/]
}, {
test: /\.jsx?$/,
test: /\.(jsx|js)?$/,
loader: 'babel',
query: {
presets: ['es2015', 'react', 'stage-1'],
plugins: ['transform-decorators-legacy' ]
plugins: ['transform-decorators-legacy']
},
include: [config.paths.src],
exclude: [/node_modules/]
}, {
test: /\.js?$/,
loader: 'babel',
include: [config.paths.src],
query: {
presets: ['es2015', 'react', 'stage-1'],
plugins: ['transform-decorators-legacy' ]
},
exclude: [/node_modules\/(?!(react-native-navbar|react-native-vector-icons|react-native-scrollable-tab-view|react-native-material-design)\/).*/,]
}, {
test: /\.(eot|otf|svg|ttf|woff|woff2|png|jpg|gif)\w*/,
loader: 'file'
Expand Down

0 comments on commit dc91a85

Please sign in to comment.