diff --git a/Makefile b/Makefile index 32d1d02..86c3e17 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ node_modules: npm install static/bundle.js: $(JS_SOURCES) node_modules - browserify -t [ babelify --presets [ react ] ] js/main.js -o static/bundle.js + browserify -t [ babelify --presets [ react es2015 ] ] js/main.js -o static/bundle.js static/react-widgets: node_modules/react-widgets/dist node_modules rsync -a node_modules/react-widgets/dist/ static/react-widgets/ diff --git a/js/components/AccountSettingsModal.js b/js/components/AccountSettingsModal.js index 7b650db..00eb757 100644 --- a/js/components/AccountSettingsModal.js +++ b/js/components/AccountSettingsModal.js @@ -12,7 +12,8 @@ var FormControl = ReactBootstrap.FormControl; var ControlLabel = ReactBootstrap.ControlLabel; var Col = ReactBootstrap.Col; -var User = require('../models').User; +var models = require('../models'); +var User = models.User; class AccountSettingsModal extends React.Component { _getInitialState(props) { diff --git a/js/models.js b/js/models.js index 76d143f..504c7e2 100644 --- a/js/models.js +++ b/js/models.js @@ -574,7 +574,7 @@ class OFXDownload { } } -module.exports = models = { +module.exports = { // Classes User: User, Session: Session, diff --git a/package.json b/package.json index 14e38b2..5fcea6e 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "js/main.js", "dependencies": { "babel-preset-react": "^6.16.0", + "babel-preset-es2015": "^6.24.1", "babelify": "^7.3.0", "big.js": "^3.1.3", "browserify": "^14.4.0",