1

i have a compilation bug only happening in production build. i cannot find why this happens. other mystery is why the build (broccoli-uglify-sourcemap) is producing sourcemap of the files i did setup as excluded in minifyJS of the config file (following here).

here is the part concerning the minification of my config file ember-cli-build.js

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
// ...

    minifyJS: {
      async: true,
      options: {
        compress: {
          collapse_vars: false
        },
        exclude: [
          "**/mylib.js",
          "**/zxcvbn-js.js"]
      }
    },
// ...

the command i run to build:

ember build --environment production 

when i setup dependencies with yarn, it builds well for dev and production. but, when i setup dependencies with npm (like our jenkins does), it breaks this "Build Error (UglifyWriter) Cannot read property '_walk' of null".

some info:

ember-cli: 2.18.0 node: 8.10.0 npm: 6.4.1 yarn: 1.10.1 os: linux x64 (ubuntu 18.04)

Ty Kayn
  • 719
  • 7
  • 24
  • I've had this a few days ago. It's a open bug in terser. [Here](https://github.com/ember-cli/ember-cli/issues/8075) is the open ember-cli issue. It also might be triggered by `tether` or something using tether like ember-tooltips. For now I would use the fix from the issue or try to get rid of `tether` (what is not a bad idea after all) – Lux Oct 10 '18 at 16:20
  • Not 100% sure but I think you need to use `ember-cli-uglify` key to configure minification for the ember-cli version used: https://stackoverflow.com/questions/50993237/how-to-specify-compression-for-custom-build-environment-in-ember – jelhan Oct 10 '18 at 20:06

0 Answers0