DEV Community

Discussion on: Setup a React app with Webpack and Babel

Collapse
 
bor_63 profile image
Stan

Hi there, after the build script I noticed that the index.bundle.js is using eval();
Example: eval("console.log(\"aaa\");\n\n//# sourceURL=webpack://reactapp/./src/components/a.js?");

In this example I have a folder in "src" called "components", there I have 1 script that simply has "console.log('aaa')". I include this script in "index.js" like so: import './components/a';. After the build command I can see it with eval() in index.bundle.js. Is this correct ?