let pkg = require('./package.json');

export default {
  entry: 'src/index.js',
  targets: [
    {
      dest: pkg['main'],
      format: 'umd',
      moduleName: 'QrCode',
      sourceMap: true
    }
  ]
};

var pkg = require('./package.json');

export default {
  entry: 'src/index.js',
  targets: [
    {
      dest: pkg['main'],
      format: 'umd',
      moduleName: 'QrCode',
      sourceMap: true
    }
  ]
};

Use "var" instead of "let" in Rollup config