-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
Description
Might be related to #14, but I'm getting more parsing errors when browserifying using tinyify. Using tinyify@2.5.0
My target is the json1 OT library at SHA 8907bf44049003efa0e3c26146fd891524b91264
The error seems to be related to environment variable handling. If I change this line:
const RELEASE_MODE = process.env.JSON1_RELEASE_MODEto
const RELEASE_MODE = 0 // or 1 or any other constantthen browserify runs successfully. It crashes if I use process.env.NODE_ENV === 'production'.
I'll have a deeper look when I have some more time if nobody else gets to it by then.
sephsmac:json1 josephg$ browserify -p tinyify lib/json1.js
Error: Line 1421: Unexpected token ...
at ErrorHandler.constructError (/Users/josephg/src/ottypes/json1/node_modules/esprima/dist/esprima.js:5012:22)
at ErrorHandler.createError (/Users/josephg/src/ottypes/json1/node_modules/esprima/dist/esprima.js:5028:27)
at Parser.unexpectedTokenError (/Users/josephg/src/ottypes/json1/node_modules/esprima/dist/esprima.js:1985:39)
..