Nordth / dojo-webpack-loader

Webpack loader for Dojo Toolkit 1.x
MIT License
36 stars 11 forks source link

Getting errors from .../lib/no-module.js and .../lib/dojo-require.js #1

Closed schmalzs closed 8 years ago

schmalzs commented 8 years ago

I was very excited to find this loader! I've been working in a dojo app for a while now and we've always been boxed into relying on the build tool that ships with dojo.

Trying to get this working on a basic level right now, but I keep getting the following errors:

ERROR in ./~/dojo-webpack-loader/lib/no-module.js Module build failed: TypeError: Cannot read property '0' of undefined at resolveCoreModuleDependency (/Users/n0199601/dev/workspaces/responsive01/ESalesClient/node_modules/dojo-webpack-loader/index.js:71:39) at Object.DojoWebpackLoader (/Users/n0199601/dev/workspaces/responsive01/ESalesClient/node_modules/dojo-webpack-loader/index.js:230:48) @ ./src/esales/main.js 5:0-82:2

ERROR in ./~/dojo-webpack-loader/lib/dojo-require.js Module build failed: TypeError: Cannot read property '0' of undefined at resolveCoreModuleDependency (/Users/n0199601/dev/workspaces/responsive01/ESalesClient/node_modules/dojo-webpack-loader/index.js:71:39) at Object.DojoWebpackLoader (/Users/n0199601/dev/workspaces/responsive01/ESalesClient/node_modules/dojo-webpack-loader/index.js:230:48) @ ./~/dojo/_base/kernel.js 1:0-309:2

I've been tinkering with things for a while now but am at a bit of a loss. I can see that the no-module.js and dojo-require.js files are included within the loader under the lib directory. However, I'm not exactly sure how they are tied into the process or why the build would be failing because of them in this way. Any insight you could provide would be most appreciated!

Nordth commented 8 years ago

I have fixed typo in resolveCoreModuleDependency function But this function is called if module's resourcePath starts with dojoWebpackLoader.dojoCorePath directory. Can you check this option in your webpack config? It should be set to folder of dojo package

schmalzs commented 8 years ago

Thank you. I pulled the latest version and it looks like the typo you fixed must've resolved the issue I was hitting. I am no longer receiving that error. I just double checked my dojoWebpackLoader.dojoCorePath value in my config and it looks like it's set properly.