Skip to content

Instantly share code, notes, and snippets.

@TimPerry
Created December 13, 2015 18:34
Show Gist options
  • Save TimPerry/522234ee4de8534496ff to your computer and use it in GitHub Desktop.
Save TimPerry/522234ee4de8534496ff to your computer and use it in GitHub Desktop.
loopback webpack react native
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