Comments (8)
Are you seeing this error when building or when try to running the built code? What target environment are you running in. Note that dojo-webpack-plugin does not support node.js as a target platform. Only browser platforms are supported, although you could probably get it to work with a browser emulator such as window. That's what this package uses for unit tests.
from dojo-webpack-plugin.
I get error in compilation when running npx webpack --config webpack.config.js
. I really need it for the web, so I changed the target to "web" in webpack.config file and the same error follows.
Would there be any other example configuration besides the loaderConfig file or webpack.config.js?
from dojo-webpack-plugin.
I don't think it's the config file. Could you post a test case that reproduces the problem?
from dojo-webpack-plugin.
Hi, I'm also having the same exact issue. In our case, this is in conjunction with the Cypress/webpack-preprocessor.
ReferenceError: location is not defined
at /.../target/generated-webapp/libs/dojo-release-1.16.4/dojo/dojo.js:8:2740
at Object.<anonymous> (/.../target/generated-webapp/libs/dojo-release-1.16.4/dojo/dojo.js:8:22014)
at DojoLoaderPlugin.createLoaderScope (/.../node_modules/dojo-webpack-plugin/lib/DojoLoaderPlugin.js:167:94)
at Hook.eval (eval at create (/.../node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
at Hook.CALL_DELEGATE [as _call] (/.../node_modules/tapable/lib/Hook.js:14:14)
at /.../node_modules/dojo-webpack-plugin/lib/DojoLoaderPlugin.js:206:68
at /.../.cache/Cypress/8.3.1/Cypress/resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:90:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
Please let me know of any information that could be useful for figuring this out (note ellipses for redactions)
from dojo-webpack-plugin.
I noticed this line on the readme: "The Dojo loader builder requires that the Dojo util directory is a sibling of the dojo directory and is named either util or dojo-util." We do not have a util directory in our dojo package. However, would we get to this point in the process if that was the issue?
from dojo-webpack-plugin.
We do not have a util directory in our dojo package
dojo-util is not in the dojo package. It is a peer dependency. So dojo-util should be in node_modules, along-side dojo.
I think your problem is that you're using a release version of the dojo loader. You need to use a source version of dojo, or else, a version built by dojo-webpack-plugin. See Building the Dojo loader. Add dojo and dojo-util (along with digit and dojox if you use those) as dependencies in your package.json and use that to build instead of the release code.
from dojo-webpack-plugin.
Just to clarify. Building your own dojo loader is not an alternative to building against the dojo sources. Whether or not you allow dojo-webpack-plugin to build the loader or you use a pre-built loader, you still need to run webpack against the dojo source code and not a release build.
from dojo-webpack-plugin.
Thanks for responding. That clears things up, we weren't managing our dojo packages with npm. Downloaded the necessary libraries and instead are having issues with publicPath
, but that's a battle for another day.
from dojo-webpack-plugin.
Related Issues (20)
- Incompatibility with Html-webpack-plugin >=4 HOT 8
- Cannot read property 'registerAbsMids' of undefined HOT 3
- Export a dojo-based bundle as a library HOT 15
- Using typescript for i18n
- Webpack 5 support HOT 6
- Documentation for Dojo-On-Dojo Plugins
- Dojo layer file doesn't show the content HOT 2
- Splitting applications into multiple bundles HOT 5
- webpack-hasjs-plugin does not appear to work with 3.0.0-rc1 HOT 4
- dojo/has missing after update to 3.0.0 HOT 6
- SyntaxError: Unexpected token '.' after upgrading to Webpack 5 HOT 1
- dojo.js:56 [HMR] Update check failed: Error: __webpack_require__.dj name collision. HOT 3
- Only running karma test, [email protected] DojoAMDMainTemplate.runtime.js::resolveTernaryHasExpression() throws "Module not found: dojo/has" error HOT 10
- Mac webpack build error using [email protected] DojoAMDResolverPlugin.js HOT 2
- Cannot read property 'getChunkModules' of undefined HOT 17
- Performance optimization: Add option to skip exporting module-name to webpack-id mappings for non-AMD modules HOT 1
- Better dojo/text! loader replacement for JSON files HOT 7
- Error in DojoAMDRuntimeModule.generate() when used with MonacoEditorWebpackPlugin
- Tapable peer dependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dojo-webpack-plugin.