Skip to content

Commit e82bf09

Browse files
committed
Use inline/constant elements in examples for perf
1 parent 0532d4c commit e82bf09

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
"babel-eslint": "^4.1.8",
4747
"babel-loader": "^6.x",
4848
"babel-plugin-react-transform": "^2.0.0",
49+
"babel-plugin-transform-react-constant-elements": "^6.5.0",
50+
"babel-plugin-transform-react-inline-elements": "^6.6.5",
4951
"babel-plugin-typecheck": "^3.6.1",
5052
"babel-preset-es2015": "^6.5.0",
5153
"babel-preset-es2015-loose": "^7.0.0",
@@ -76,4 +78,4 @@
7678
"pre-commit": [
7779
"lint"
7880
]
79-
}
81+
}

webpack-examples.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ module.exports = {
1515
},
1616
module: {
1717
loaders: [
18-
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?cacheDirectory=true'}
18+
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', query: {
19+
cacheDirectory: true,
20+
plugins: [
21+
'transform-react-inline-elements',
22+
'transform-react-constant-elements',
23+
]
24+
}}
1925
]
2026
},
2127
plugins: [
2228
new webpack.DefinePlugin({
2329
"process.env": {
24-
NODE_ENV: JSON.stringify('development')
30+
NODE_ENV: JSON.stringify('production')
2531
}
2632
}),
2733
new webpack.optimize.CommonsChunkPlugin(

0 commit comments

Comments
 (0)