import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import angular from 'rollup-plugin-angular';
import typescript from 'rollup-plugin-typescript';
var sass = require('node-sass');
import {nameLibrary,PATH_SRC,PATH_DIST} from './config-library.js';
export default {
  entry: PATH_SRC+nameLibrary+'.ts',
  format: 'umd',
  moduleName: nameLibrary,
  external: [
    '@angular/core',
    "@angular/platform-browser",
    "rxjs/Rx",
    "@angular/forms"
  ],
  sourceMap:true,
  dest:PATH_DIST+nameLibrary+".umd.js",
  plugins: [
    angular(
      {
      preprocessors:{
        template:template => template,
        style: scss => {
            let css;
            if(scss){
              css = sass.renderSync({ data: scss }).css.toString();
              console.log(css);
            }else{
              css = '';
            }
            
            return css;
        },
      }
    }
    ),
    typescript({
      typescript:require('typescript')
    }),
    resolve({
      module: true,
      main: true
    }),
     commonjs({
      include: 'node_modules/**',
     })
  ],
   onwarn: warning => {
    const skip_codes = [
      'THIS_IS_UNDEFINED',
      'MISSING_GLOBAL_NAME'
    ];
    if (skip_codes.indexOf(warning.code) != -1) return;
    console.error(warning);
  }
};
@@ -310,13 +310,13 @@
 %7B%0A  
-entry
+input
 : PA
@@ -347,48 +347,126 @@
 ,%0A  
-format: 'umd',%0A  moduleName: nameLibrary
+output: %7B%0A    name: nameLibrary,%0A    format: 'umd',%0A    file: PATH_DIST+nameLibrary+%22.umd.js%22,%0A    sourcemap:true,%0A  %7D
 ,%0A  
@@ -571,71 +571,13 @@
 ms%22%0A
+
   %5D,%0A
-  sourceMap:true,%0A  dest:PATH_DIST+nameLibrary+%22.umd.js%22,%0A
   pl
@@ -1348,8 +1348,9 @@
 ;%0A  %7D%0A%7D;
+%0A

Change deprecated config for USM