Add documentation for webpack@2 *.web.js resolving

Fix #334
This commit is contained in:
Nicolas Gallagher
2017-01-28 09:57:14 -08:00
parent c51e7f1965
commit c2501f2bc2

View File

@@ -86,7 +86,19 @@ if (Platform.OS === 'web') {
```
More substantial Web-specific implementation code should be written in files
with the extension `.web.js`, which webpack will automatically resolve.
with the extension `.web.js`. Webpack@1 will automatically resolve these files.
Webpack@2 requires additional configuration.
```js
// webpack.config.js
module.exports = {
// ...
resolve: {
extensions: [ '.web.js', '.js' ]
}
};
```
## Optimizations