[SOLVED] Bundling typescript with RollUp – Couldn't process compiler options

Table of Contents


I’m trying to bundle my typescript files RollUp (https://rollupjs.org/)
I used this configuration files:


import alias from 'rollup-plugin-alias';
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import angular from 'rollup-plugin-angular';

export default {
    entry: '../main.ts',
    format: 'iife',
    dest: 'dist/bundle.es2015.js',
    sourceMap: true,
    plugins: [
        alias({ rxjs: __dirname + '/node_modules/rxjs-es' }),
            jsnext: true,
            main: true,
            browser: true
    external: [
    globals: {
        '@angular/common': 'vendor._angular_common',
        '@angular/compiler': 'vendor._angular_compiler',
        '@angular/core': 'vendor._angular_core',
        '@angular/http': 'vendor._angular_http',
        '@angular/platform-browser': 'vendor._angular_platformBrowser',
        '@angular/platform-browser-dynamic': 'vendor._angular_platformBrowserDynamic',
        '@angular/router': 'vendor._angular_router',
        '@angular/forms': 'vendor._angular_forms'


import * as _angular_common from '@angular/common';
import * as _angular_compiler from '@angular/compiler';
import * as _angular_core from '@angular/core';
import * as _angular_http from '@angular/http';
import * as _angular_platformBrowser from '@angular/platform-browser';
import * as _angular_platformBrowserDynamic from '@angular/platform-browser-dynamic';
import * as _angular_router from '@angular/router';
import * as _angular_forms from '@angular/forms';

export default {

But I keep getting this error:

rollup-plugin-typescript: Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'.
rollup-plugin-typescript: Unknown compiler option 'lib'.
rollup-plugin-typescript: Couldn't process compiler options

What am I doing wrong? (I’m new at this so if I’m didn’t write some needed information – please tell me)


This is my tsconfig.json:

  "compilerOptions": {
    "target": "es2017",
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": ".\\Compiled-JS\\Apps\\Client",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [ "es2015", "dom" ],
    "noImplicitAny": true,
    "suppressImplicitAnyIndexErrors": true


You may need to use rollup-plugin-typescript2.

Rollup-plugin-typescript seems to support 1.8.9 as default, which may also be a part of the problem.

Answered By – Denis Tsoi

Answer Checked By – Timothy Miller (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *