Grabbing FeatureFilter as ES Module not handing me the constructor

213
3
Jump to solution
04-28-2021 09:05 AM
matt_ander
New Contributor II

I'm migrating over to the es modules approach since it's much cleaner than the loader. However I've run into an issue with FeatureFilter.

 

import FeatureFilter from '@arcgis/core/views/layers/support/FeatureFilter';
...
this.layerViews['Parks'].filter = new FeatureFilter(query);
 
results in a console error telling me that FeatureFilter is not a constructor. If I check FeatureFilter at the global level, it's undefined. What should I be importing?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
matt_ander
New Contributor II

For anyone else encountering this, I had to specify the '.js' file extension for it to work. Not sure why. 

View solution in original post

0 Kudos
3 Replies
ReneRubalcava
Frequent Contributor II

Do you have a sample project to repro this with? I tried locally and not seeing this issue. I checked against the CDN as well and that works too.

https://codepen.io/odoe/pen/bGgJPRz?editors=0010

0 Kudos
matt_ander
New Contributor II

Okay thanks. I can't share the code unfortunately so I'll dig a bit deeper. Must be something on my end.

0 Kudos
matt_ander
New Contributor II

For anyone else encountering this, I had to specify the '.js' file extension for it to work. Not sure why. 

0 Kudos