This repository was archived by the owner on Sep 15, 2023. It is now read-only.
This repository was archived by the owner on Sep 15, 2023. It is now read-only.
Build issue: UglifyJs - Unexpected token: name (context) #566
Open
Description
Jumped back to an older Ruby on Rails project that runs on Blendid, has React baked in, and without doing anything to my own code I started getting the following during the build to production:
gulp-notify: [Error running Gulp] Error:
app-db772911ddfbfa40329a.js from UglifyJs
Unexpected token:
name (context) [app-db772911ddfbfa40329a.js:67035,12]
I even tried a fresh clean install with Blendid, but this has the same issue.
My task-config.js
is the following:
module.exports = {
html: false,
images: true,
fonts: true,
svgSprite: true,
stylesheets: true,
browserSync: {
proxy: 'localhost:3000',
files: ['app/**/*'],
snippetOptions: {
rule: {
match: /<\/head>/i,
fn: function(snippet, match) {
return snippet + match;
}
}
}
},
javascripts: {
publicPath: '/assets/javascripts',
entry: {
app: ['./app.js']
},
babel: {
presets: ['react-app']
},
provide: {
$: 'jquery',
jQuery: 'jquery'
}
}
};
And my package.json
:
{
"name": "trp",
"version": "1.0.0",
"main": "index.js",
"repository": "[email protected]:studiocoucou/the-retail-psychologist.git",
"author": "Jere Salonen <[email protected]>",
"license": "MIT",
"dependencies": {
"autosize": "^4.0.2",
"axios": "^0.18.0",
"babel-cli": "^6.24.1",
"babel-preset-es2016": "^6.24.1",
"blendid": "^4.0.1",
"bourbon": "^5.1.0",
"datatables.net": "^1.10.19",
"file-extension": "^4.0.5",
"imagesloaded": "^4.1.4",
"jquery-ui": "^1.12.1",
"js-cookie": "^2.2.0",
"marked": "^0.5.1",
"prop-types": "^15.6.2",
"rails-ujs": "^5.2.1",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-markdown": "^4.0.1",
"react-player": "^1.6.6",
"react-s3-uploader": "^4.8.0",
"react-sortable-hoc": "^0.8.3",
"reframe.js": "^2.2.3",
"shortid": "^2.2.13",
"striptags": "^3.1.1",
"styled-components": "^3.4.9",
"turbolinks": "^5.2.0",
"uglify-js": "3.3.x"
},
"devDependencies": {
"babel-preset-react-app": "^2.2.0"
}
}
Metadata
Metadata
Assignees
Labels
No labels