Skip to content

Tag: webpack

Babel not compiling vendors chuck

I migrated to Webpack 4 and set up everything according to the Docs, however, my vendors.js chunk is not getting compiled like the main.js chunk. I have placed the vendors into the optimization.splitChunks.cacheGroups object, as the docs suggested, but didnt find a way to make these “cacheGroups” …

Storybook with absolute paths

In our app we use absolute paths for importing. As an example if we have a path which is relative to the src folder, we can just write import module from “components/myComponent”. The issue is that this is not working in storybook. After some digging it turns out you can take the default webpack c…

Babel not transpiling arrow functions (Webpack)

When running webpack, and babel, the resulting bundle.js still contains arrow functions. This gives me a Syntax Error when running in Internet Explorer 10. I would like babel to replace the arrow functions with normal functions that IE can run. My package.json has the following devDependencies: My webpack.con…

How to import ipcRenderer in react?

I’ve tried to import ipcRenderer in react app but I get this error message : require is not defined Answer You need to use Otherwise it will try to import it from Webpack or whatever module bundler you use. You can checkout this thread for a better explanation: https://github.com/electron/electron/issue…