Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
demo webpack conifg
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuke Shibata committed Nov 26, 2017
1 parent 909ad0d commit ad0f5ff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = {
presets: [
[ 'env' , {
targets: {
node: '5'
browsers: ['last 2 versions', 'safari >= 7']
}
}],
'react'
Expand Down
24 changes: 21 additions & 3 deletions demo/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ module.exports = {
// You can exclude the *.map files from the build during deployment.
devtool: 'source-map',
// In production, we only want to load the polyfills and the app code.
entry: [require.resolve('./polyfills'), paths.appIndexJs],
entry: [
require.resolve('regenerator-runtime/runtime'),
require.resolve('./polyfills'),
paths.appIndexJs
],
output: {
// The build folder.
path: paths.appBuild,
Expand Down Expand Up @@ -93,7 +97,7 @@ module.exports = {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
'react-pullrefresh': fs.realpathSync('..')
'react-pullrefresh': '../src/react-pullrefresh'
},
plugins: [
// Prevents users from importing files from outside of src/ (or node_modules/).
Expand Down Expand Up @@ -166,8 +170,22 @@ module.exports = {
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {

compact: true,

babelrc: false,
presets: [
[ 'env' , {
targets: {
browsers: ['last 2 versions', 'safari >= 7']
}
}],
'react'
],
plugins: [
'transform-regenerator',
'transform-function-bind',
'transform-object-rest-spread'
]
},
},
// The notation here is somewhat confusing.
Expand Down

0 comments on commit ad0f5ff

Please sign in to comment.