mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 22:44:52 +00:00
Build UMD bundle from source
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ListViewDataSource from './ListViewDataSource';
|
||||
import { PropTypes } from 'react';
|
||||
import ScrollView, { propTypes as ScrollViewPropTypes } from '../ScrollView';
|
||||
import { propTypes as ScrollViewPropTypes } from '../ScrollView';
|
||||
|
||||
export default {
|
||||
...ScrollViewPropTypes,
|
||||
|
||||
+17
-3
@@ -2,12 +2,11 @@ const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
const SRC_DIRECTORY = './src'
|
||||
const DIST_DIRECTORY = './dist'
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
main: DIST_DIRECTORY
|
||||
},
|
||||
entry: SRC_DIRECTORY,
|
||||
externals: [
|
||||
{
|
||||
react: {
|
||||
@@ -18,6 +17,21 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
],
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader',
|
||||
query: { cacheDirectory: true }
|
||||
},
|
||||
{
|
||||
test: /\.(gif|jpe?g|png|svg)$/,
|
||||
loader: 'url-loader',
|
||||
query: { name: '[name].[ext]' }
|
||||
}
|
||||
]
|
||||
},
|
||||
output: {
|
||||
filename: 'ReactNative.js',
|
||||
library: 'ReactNative',
|
||||
|
||||
Reference in New Issue
Block a user