Skip to content

Commit

Permalink
fix(babel): do not use capital letters (#754)
Browse files Browse the repository at this point in the history
Due to babel/babel#7035 we can't name RHL as RHL in babel template.
Fixes #753
  • Loading branch information
theKashey authored and gregberge committed Dec 30, 2017
1 parent 833ba4b commit bf48675
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 131 deletions.
6 changes: 3 additions & 3 deletions packages/react-hot-loader/src/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function plugin(args) {
const { types: t, template } = args

const buildRegistration = template(
'RHL.register(ID, NAME, FILENAME);',
'reactHotLoader.register(ID, NAME, FILENAME);',
templateOptions,
)
const headerTemplate = template("require('react-hot-loader/patch');")
Expand All @@ -31,9 +31,9 @@ module.exports = function plugin(args) {
const buildTagger = template(
`
(function () {
var RHL = require('react-hot-loader/patch').default;
var reactHotLoader = require('react-hot-loader/patch').default;
if (!RHL) {
if (!reactHotLoader) {
return;
}
Expand Down
Loading

0 comments on commit bf48675

Please sign in to comment.