Created
December 13, 2015 18:34
-
-
Save TimPerry/522234ee4de8534496ff to your computer and use it in GitHub Desktop.
loopback webpack react native
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LoopbackBootPlugin = require('loopback-webpack-plugin'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var config = { | |
debug: true, | |
devtool: 'source-map', | |
entry: { | |
'index.ios': ['./src/main.js'], | |
'android.ios': ['./src/main.js'], | |
}, | |
output: { | |
path: path.resolve(__dirname, 'build'), | |
filename: '[name].js', | |
}, | |
module: { | |
preloaders: [], | |
loaders: [{ | |
test: /\.json$/, | |
loader: 'json' | |
}, { | |
test: /\.js$/, | |
exclude: /node_modules/, | |
loader: 'babel', | |
query: { | |
stage: 0, | |
plugins: [] | |
}, | |
}] | |
}, | |
node: { | |
net: "empty", | |
tls: "empty", | |
}, | |
plugins: [ | |
new LoopbackBootPlugin({ | |
appRootDir: path.resolve(__dirname, 'src/loopback') | |
}) | |
], | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment