question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

loading custom package using loaderConfig

See original GitHub issue

Description

I am trying to use FlareCluster package with ArcGIS Webpack plugin. but I am getting following error:

Uncaught ReferenceError: exports is not defined
    at Module fcl/FlareCluster.js (FlareClusterLayer_v4.ts:1)
    at __webpack_require__ (bootstrap:63)  

I am trying to load compiled version (javascript) of package using loaderConfig in esriConfig as mentioned.

{ name: "fcl", location: window.baseUrl + '/js/fcl' },

Expected Behavior

Custom package should load correctly and should be able to import using name;

Actual Behavior

unable to define custom package. throwing below error:

Uncaught ReferenceError: exports is not defined
    at Module fcl/FlareCluster.js (FlareClusterLayer_v4.ts:1)
    at __webpack_require__ (bootstrap:63)  

Possible Fix

Steps to Reproduce

Context

Your Environment

  • Version used: 4.16
  • Browser Name and version: Chrome v86.x
  • Operating System and version (desktop or mobile): Windows (Desktop)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
odoecommented, Oct 15, 2020

Here’s a sample project using the FlareClusterLayer and webpack. https://github.com/odoe/webpack-flarecluster

0reactions
apalejacommented, Oct 16, 2020

Thank you very much for sample project. Got it working. Had to exclude FlareClusterLayer in babel-loader.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I load my external package by mathjax-full v3.0.5 in ...
import {Loader, CONFIG} from 'mathjax-full/js/components/loader.js'; ... I trace this error , and find when load packages, it use script tag.
Read more >
Default API Configurations | ArcGIS API for JavaScript 3.29
The defaults for all configuration options are stored in the esri/config module. To modify a default, load that module, alias it as esriConfig...
Read more >
Deploy your client-side web part to a SharePoint page (Hello ...
Deploy the HelloWorld package to app catalog · Go to your site's app catalog. · If you see classic experience in the app...
Read more >
How to customize font loading URL when loading mathjax in ...
But I want to pack the library with my Angular application. I have imported the library in my component. import 'mathjax/es5/tex-chtml';.
Read more >
Marcus Christie – My random musings
I'm interested in this as a way to plug in custom user interfaces in the Airavata ... So that's how to build a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found