mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-13 09:30:23 +08:00
Hack in touch event normalization within `View` to produce events that contain `pageX`, `pageY` for React Native compatibility.
38 lines
797 B
JavaScript
38 lines
797 B
JavaScript
const constants = require('./constants')
|
|
const path = require('path')
|
|
const webpack = require('webpack')
|
|
|
|
module.exports = {
|
|
devServer: {
|
|
contentBase: constants.EXAMPLES_DIRECTORY
|
|
},
|
|
entry: {
|
|
example: constants.EXAMPLES_DIRECTORY
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
query: { cacheDirectory: true }
|
|
}
|
|
]
|
|
},
|
|
output: {
|
|
filename: 'examples.js'
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
|
|
}),
|
|
new webpack.optimize.DedupePlugin(),
|
|
new webpack.optimize.OccurenceOrderPlugin()
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'react-native': path.join(__dirname, '../src')
|
|
}
|
|
}
|
|
}
|