whole_func_string: function rawjs(opts) {
    opts = opts || {}
    return {
      transform: (code, id) => {
        var variable = opts[id.split('/').pop()]
        if (!variable) return code
  
        var keepStr = '/*rollup-keeper-start*/window.tmp=' + variable +
          ';/*rollup-keeper-end*/'
        return code + keepStr
      },
      transformBundle: (code) => {
        for (var file in opts) {
          var r = new RegExp(opts[file] + '\\$\\d+', 'g')
          code = code.replace(r, opts[file])
        }
        var re = /\/\*rollup-keeper-start\*\/.*\/\*rollup-keeper-end\*\//g
        return code.replace(re, '')
      }
    }
  }
func_code_string: function rawjs(opts) {
    opts = opts || {}
    return {
      transform: (code, id) => {
        var variable = opts[id.split('/').pop()]
        if (!variable) return code
  
        var keepStr = '/*rollup-keeper-start*/window.tmp=' + variable +
          ';/*rollup-keeper-end*/'
        return code + keepStr
      },
      transformBundle: (code) => {
        for (var file in opts) {
          var r = new RegExp(opts[file] + '\\$\\d+', 'g')
          code = code.replace(r, opts[file])
        }
        var re = /\/\*rollup-keeper-start\*\/.*\/\*rollup-keeper-end\*\//g
        return code.replace(re, '')
      }
    }
  }
func_documentation_string: Rollup removes local variables unless used within a module. This plugin makes sure specified local variables are preserved and kept local. This plugin wouldn't be necessary if es2015 modules would be used.