Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Build issue: UglifyJs - Unexpected token: name (context) #565

Closed
hellojere opened this issue Oct 3, 2018 · 0 comments
Closed

Build issue: UglifyJs - Unexpected token: name (context) #565

hellojere opened this issue Oct 3, 2018 · 0 comments

Comments

@hellojere
Copy link

Jumped back to an older Ruby on Rails project that runs on Blendid 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 no luck there.

As far as I've understood this is an UglifyJS issue, and more specifically an ES6 one, but have tried all the examples available without any luck.

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'
    }
  }
};

What would be the solution to get this back running again?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant