catamphetamine / webpack-isomorphic-tools

Server-side rendering for your Webpack-built applications (e.g. React)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seems like my webpack.config.js file is getting ignored

danazkari opened this issue · comments

Hello, so I have a webpack.config.js file where I filled the resolve.modules array with my src and node_modules folder, following this documentation for webpack 2/3 (I have webpack 2 installed).
I have a folder in the root where I store my components src/components, so that from anywhere in my code, I can reference a component by doing import Component from 'components/Component'.

If I go and make a simple build to a dist folder, everything works beautifully, so I know that my webpack config is fine. But when I try to make the webpack-isomorphic-tools setup run, it seems like it's using a config file on it's own and plain ignoring my well crafted config file!

Any ideas on how to add support for the same resolve.modules from webpack-isomorphic-tools? Doesn't seem to be documented anywhere!

Disclaimer: I inherited this project I'm working on, I didn't code the config for the webpack-isomorphic-tools setup we have right now.

resolve.modules is the new name for resolve.modulesDirectories.
Add modulesDirectories parameter to the webpack-isomorphic-tools.js config.

  // if you're using Webpack's `resolve.modulesDirectories`
  // then you should also put them here.
  //
  // modulesDirectories: webpackConfiguration.resolve.modulesDirectories // is ['node_modules'] by default

Perhaps then it could work.