Works:
./node_modules/.bin/browserify -t [reactify --es6] src/frontend/index.js
Does not work:
./node_modules/.bin/browserify src/frontend.index.js
import React, { useEffect } from "react"; | |
import { withRouter } from 'react-router-dom' | |
import { useProductSelectors, useProductActions } from "../redux/actions/products" | |
import Qs from 'querystring' | |
const Products = withRouter(({ location: { search }, history}) => { | |
const actions = useProductActions() | |
const [products] = useProductSelectors(selectors => [selectors.getProducts()]) |
import Raven from 'raven-js'; | |
if (process.env.NODE_ENV === 'production') { | |
Raven.config('https://<foo>@app.getsentry.com/<bar>').install(); | |
window.onunhandledrejection = function(data) { | |
Raven.captureException(data.reason); | |
}; | |
} |
const TeamForm = ({ handleSubmit, i18n, array }) => ( | |
<form onSubmit={handleSubmit}> | |
{ /* Other form inputs */ } | |
<Field name="persons" component={renderRows(i18n)} array={array} /> | |
{ /* Other form inputs */ } | |
</form> | |
); | |
const Component = React.createClass({ | |
propTypes: { | |
file: requireThisOr('files', React.PropTypes.instanceOf(File).isRequired), | |
files: requireThisOr('file', React.PropTypes.arrayOf(React.PropTypes.instanceOf(File)).isRequired) | |
} | |
}) |
//omitted a lot | |
translations.fi().then(i18n => { | |
let initialState = { | |
locales: { | |
currentLocale: 'fi', | |
i18n | |
} | |
}; | |
const store = am(createStore)(reducer, initialState); |
export PATH := ./node_modules/.bin/:$(PATH) | |
node_modules_less_files = $(shell find node_modules -type f -name '*.less') | |
default.css: bootstrap.css react-widgets.css default.styl | |
stylus --include-css -u nib --import nib -p default.styl > $@ | |
bootstrap.css: build-bootstrap.less $(node_modules_less_files) | |
lessc build-bootstrap.less > $@ | |
react-widgets.css: build-react-widgets.less $(node_modules_less_files) |
dist/application.min.js |
var Reflux = require('reflux'), | |
_ = require('underscore'), | |
api = require('./api'); | |
var TodoActions = Reflux.createActions(['create', 'created', 'errored']); | |
TodoActions.create.preEmit = function(data) { | |
data = _.extend({_iid: _.uniqueId('todo_')}, data); | |
api.createTodo(data).then(function(todo) { TodoActions.created(_.extend({_iid: data._iid}, todo)); }) | |
.catch(function(err) { TodoActions.errored(_.extend({_iid: data._iid}, {_error: err}))}); |
Works:
./node_modules/.bin/browserify -t [reactify --es6] src/frontend/index.js
Does not work:
./node_modules/.bin/browserify src/frontend.index.js
'use strict'; | |
var spawn = require('child_process').spawn, | |
Promise = require('bluebird'), | |
_ = require('underscore'), | |
concat = require('concat-stream'); | |
var o = module.exports = {}; | |
o.req = function(privKeyPem, subjectData) { | |
return new Promise(function(resolve, reject) { |