Skip to content

Commit

Permalink
Move to react-transform
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed Nov 23, 2015
1 parent 4a7c32e commit aa5472a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"stage": 0,
"plugins": ["react-display-name"]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"babel-core": "^5.x",
"babel-eslint": "^4.1.5",
"babel-loader": "^5.x",
"babel-plugin-typecheck": "^3.0.1",
"babel-plugin-react-display-name": "^2.0.0",
"babel-plugin-react-transform": "^1.1.1",
"babel-plugin-typecheck": "^2.0.0",
"babel-runtime": "5.x",
"css-loader": "^0.23.0",
"ejs": "^2.3.4",
Expand All @@ -58,6 +60,7 @@
"react": "^0.14.2",
"react-dom": "^0.14.2",
"react-hot-loader": "^1.3.0",
"react-transform-hmr": "^1.0.1",
"style-loader": "^0.13.0",
"webpack": "^1.12.6",
"webpack-dev-server": "^1.12.1"
Expand Down
19 changes: 17 additions & 2 deletions webpack-dev-server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,23 @@ module.exports = {
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?stage=0&plugins=typecheck'},
{test: /\.jsx$/, exclude: /node_modules/, loader: 'react-hot-loader'}
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader',
query: {
cacheDirectory: true,
plugins: ['react-transform'],
extra: {
'react-transform': {
transforms: [
{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module']
}
]
}
}
}
}
]
},
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion webpack-examples.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?stage=0&optional=runtime'}
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime'}
]
},
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader?stage=0"}
{test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"}
]
},
plugins: [
Expand Down

0 comments on commit aa5472a

Please sign in to comment.