Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.8.13 -> 2.8.14 issue #287

Closed
GordonSmith opened this issue Jun 17, 2020 · 6 comments
Closed

2.8.13 -> 2.8.14 issue #287

GordonSmith opened this issue Jun 17, 2020 · 6 comments

Comments

@GordonSmith
Copy link
Contributor

Just bumped my version from 2.8.13 to 2.8.14 and am now getting a "loaderScope.require is not defined" for the following line in the bundle:

/******/ 		loaderScope.require.baseUrl = "./";

I haven't done any investigation yet (and this was in conjunction with bumping dojo to the latest (although rolling back to 2.8.13 resolves the issue)

@GordonSmith
Copy link
Contributor Author

GordonSmith commented Jun 17, 2020

A bit more context:

/******/ 		var loaderScope = Object.create(globalObj, {
/******/ 		   document:{value: globalObj.document},
/******/ 		});
/******/ 		Object.defineProperties(loaderScope, {
/******/ 		   window:{value:loaderScope},
/******/ 		   global:{value:loaderScope}
/******/ 		});
/******/ 		globalObj.dojoConfig = globalObj.dojoConfig || {}
/******/ 		var userConfig = mix(globalObj.dojoConfig, ({'baseUrl':'.','deps':['lib/index'],'async':true,'has':({'dojo-config-api':false}),'selectorEngine':'lite','fixupUrl':(function (url) {
/******/ 					// Load the uncompressed versions of dojo/dijit/dojox javascript files when using the dojo loader.
/******/ 					// When using a webpack build, the dojo loader is not used for loading javascript files so this
/******/ 					// property has no effect.  This is only needed because we're loading Dojo from a CDN for this
/******/ 					// demo.  In a normal development envorinment, Dojo would be installed locally and this wouldn't
/******/ 					// be needed.
/******/ 					if (/\/(dojo|dijit|dojox)\/.*\.js$/.test(url)) {
/******/ 						url += ".uncompressed.js";
/******/ 					}
/******/ 					return url;
/******/ 				})}));
/******/ 		var defaultConfig = ({'hasCache':({'webpack':1,'host-browser':1,'dom':1,'dojo-loader':1,'dojo-has-api':1,'dojo-dom-ready-api':1,'dojo-sniff':1,'dojo-test-sniff':1,'config-deferredInstrumentation':1,'config-tlmSiblingOfDojo':1}),'paths':({'js':'js','theme':'theme','css':'//chuckdumont.github.io/dojo-css-plugin/1.0.0/css'}),'pathsMapProg':[['theme','theme',/^theme(\/|$)/,5],['css','//chuckdumont.github.io/dojo-css-plugin/1.0.0/css',/^css(\/|$)/,3],['js','js',/^js(\/|$)/,2]],'packs':({'dojo':({'main':'main','name':'dojo','location':'dist/dojo','lib':'.'}),'dijit':({'main':'main','name':'dijit','location':'dist/dijit','lib':'.'}),'dojox':({'main':'main','name':'dojox','location':'dist/dojox','lib':'.'}),'dojo-themes':({'main':'main','name':'dojo-themes','location':'dist/dojo-themes','lib':'.'}),'dgrid':({'main':'main','name':'dgrid','location':'dist/dgrid','lib':'.'}),'dstore':({'main':'main','name':'dstore','location':'dist/dojo-dstore','lib':'.'})}),'aliases':[],'mapProgs':[],'cacheBust':undefined,'modules':({}),'cache':({})});
/******/ 		var dojoLoader = __webpack_require__(109);
/******/ 		dojoLoader.call(loaderScope, userConfig, defaultConfig, loaderScope, loaderScope);
/******/ 		loaderScope.require.baseUrl = "./";  //  <----- ERROR ERROR ERROR ERROR
/******/ 		Object.keys(loaderScope.require.packs).forEach(function(key) {

@chuckdumont
Copy link
Collaborator

I'm not able to reproduce this. Do you think you could provide a test case that reproduces the error?

@GordonSmith
Copy link
Contributor Author

GordonSmith commented Jun 18, 2020

I couldn't reproduce the exact same issue, but did create a similar one easily enough:

https://github.com/GordonSmith/dojo-webpack-plugin-sample/tree/GH-287
(Branch GH-287)

npm install
npm run build

open test.html in a browser and check the console output

The above works fine in 2.8.13, but with 2.8.14 fails on:

/******/ 		Object.keys(loaderScope.require.packs).forEach(function(key) {

@chuckdumont
Copy link
Collaborator

Thanks for the test case. It was helpful. Please try 2.8.15-rc1 and see if that resolves your issue.

@GordonSmith
Copy link
Contributor Author

Yup that works!

@chuckdumont
Copy link
Collaborator

chuckdumont commented Jun 18, 2020

Fixed in v2.8.15 by #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants