mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-04 11:04:58 +00:00
Build UMD bundle from source
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import ListViewDataSource from './ListViewDataSource';
|
import ListViewDataSource from './ListViewDataSource';
|
||||||
import { PropTypes } from 'react';
|
import { PropTypes } from 'react';
|
||||||
import ScrollView, { propTypes as ScrollViewPropTypes } from '../ScrollView';
|
import { propTypes as ScrollViewPropTypes } from '../ScrollView';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...ScrollViewPropTypes,
|
...ScrollViewPropTypes,
|
||||||
|
|||||||
+17
-3
@@ -2,12 +2,11 @@ const path = require('path')
|
|||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
|
|
||||||
|
const SRC_DIRECTORY = './src'
|
||||||
const DIST_DIRECTORY = './dist'
|
const DIST_DIRECTORY = './dist'
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: SRC_DIRECTORY,
|
||||||
main: DIST_DIRECTORY
|
|
||||||
},
|
|
||||||
externals: [
|
externals: [
|
||||||
{
|
{
|
||||||
react: {
|
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: {
|
output: {
|
||||||
filename: 'ReactNative.js',
|
filename: 'ReactNative.js',
|
||||||
library: 'ReactNative',
|
library: 'ReactNative',
|
||||||
|
|||||||
Reference in New Issue
Block a user