Skip to content

Commit

Permalink
Updates react native build to use webpack v1 (#1510)
Browse files Browse the repository at this point in the history
* Updates react native build to use webpack v1

* Updates Travis tests
  • Loading branch information
chrisradek authored May 11, 2017
1 parent 8904e9c commit fa31d45
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ script:
- npm run coverage
- npm run buildertest
- npm run browsertest
- npm run react-native-test
- node ./node_modules/.bin/codecov

sudo: false
18 changes: 17 additions & 1 deletion dist-tools/webpack.config.rn.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ module.exports = {
library: 'AWS'
},
resolve: {
aliasFields: ['react-native']
packageAlias: 'react-native'
},
module: {
/**
* Tell webpack how to load 'json' files.
* By default, webpack only knows how to handle
* JavaScript files.
* When webpack comes across a 'require()' statement
* where a json file is being imported, it will use
* the json-loader.
*/
loaders: [
{
test: /\.json$/,
loaders: ['json']
}
]
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"istanbul": "*",
"jasmine": "^2.5.3",
"jasmine-core": "^2.5.2",
"json-loader": "^0.5.4",
"karma": "^1.4.1",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.2",
Expand All @@ -33,7 +34,7 @@
"semver": "*",
"typescript": "2.0.8",
"uglify-js": "2.x",
"webpack": "^2.4.1"
"webpack": "^1.15.0"
},
"dependencies": {
"buffer": "5.0.6",
Expand Down Expand Up @@ -135,4 +136,4 @@
"build-react-native": "webpack --config dist-tools/webpack.config.rn.js",
"react-native-test": "npm -s run-script build-react-native && rake reactnative:test && karma start"
}
}
}

0 comments on commit fa31d45

Please sign in to comment.