rollup: Use of `eval` (in C:\Users\\MyApps\todolistapp\node_modules\angularfire2\node_modules\firebase\firebase.js) is strongly discouraged, as it poses security risks and may cause issues with minification. See https://github.com/rollup/rollup/

205 views
Skip to first unread message

אדיר זוארי

unread,
Oct 9, 2016, 2:00:49 PM10/9/16
to Firebase Google Group
hello, 
I get this error when i try to configure the firebase.



this is my rollup.config.js code
console.log("I'm the Hulk");

var nodeResolve = require('rollup-plugin-node-resolve');
var commonjs = require('rollup-plugin-commonjs');
var globals = require('rollup-plugin-node-globals');
var builtins = require('rollup-plugin-node-builtins');
var json = require('rollup-plugin-json');


// https://github.com/rollup/rollup/wiki/JavaScript-API

var rollupConfig = {
 
/**
   * entry: The bundle's starting point. This file will
   * be included, along with the minimum necessary code
   * from its dependencies
   */
  entry: 'src/app/main.dev.ts',

 
/**
   * sourceMap: If true, a separate sourcemap file will
   * be created.
   */
  sourceMap: true,

 
/**
   * format: The format of the generated bundle
   */
  format: 'iife',

 
/**
   * dest: the output filename for the bundle in the buildDir
   */
  dest: 'main.js',
 
  useStrict
: false,
 
/**
   * plugins: Array of plugin objects, or a single plugin object.
   * See https://github.com/rollup/rollup/wiki/Plugins for more info.
   */
  plugins: [
    builtins
(),
    commonjs
({
      include
: [
       
'node_modules/rxjs/**', // firebase needs rxjs to avoid build errors
        'node_modules/firebase/**', // here we're calling firebase.
        'node_modules/angularfire2/**' // here we're calling angularfire2.
      ],
      namedExports
: {
       
'node_modules/firebase/firebase.js': ['initializeApp', 'auth', 'database'],
       
'node_modules/angularfire2/node_modules/firebase/firebase-browser.js': ['initializeApp', 'auth', 'database']
     
}
   
}),
    nodeResolve
({
     
module: true,
      jsnext
: true,
      main
: true,
      browser
: true,
      extensions
: ['.js']
   
}),
    globals
(),
    json
()
 
]

};


if (process.env.IONIC_ENV == 'prod') {
 
// production mode
  rollupConfig.entry = '{{TMP}}/app/main.prod.ts';
  rollupConfig
.sourceMap = false;
}


module.exports = rollupConfig;



Kato Richardson

unread,
Oct 9, 2016, 8:11:48 PM10/9/16
to Firebase Google Group
Is there some resulting issue you're trying to resolve here? From what I can tell, it looks to complete just fine, despite the warning.

If the warning is bothering you, then hopefully rollup, like most lint libs, provides a way to exclude third-party apps or particular checks on those apps. 

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/84b4d34d-f72c-45f2-a416-99402233dc4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages