368 questions
1
vote
1
answer
58
views
Dynamically importing a JSON file is causing too many re-renders
I am building an i18n context provider to dynamically import JSON files with the messages.
The context provider is the following:
type Locale = "es" | "en";
type I18nData = {
...
0
votes
1
answer
103
views
Blazor Collocate js and cs files
It is possible to collocate a .js file and a related .razor file as described here.
Is there a way to collocate a .js file and .cs file in a similar way? I imagine it looking similar to this:
...
0
votes
0
answers
100
views
How to make PyCharm recognize dynamic imports for local scripts?
I'm facing a peculiar issue with PyCharm and Python imports. I have a well-organized directory with all my "stable" code, and a separate area for local scripts that are more experimental and ...
0
votes
1
answer
123
views
Next.js: How to optimize dynamic template loading to prevent unnecessary template files from being fetched
Problem
I have a Next.js application where I'm dynamically loading portfolio templates based on user preferences. While the functionality works, I noticed in the developer console that all template ...
0
votes
2
answers
68
views
using map event handler for dynamically imported data massively slows down the page
I have a leaflet map with a few hundred markers on it. The markers are clustered with the markercluster plugin, and the data for the markers is loaded with a dynamic import depending on the user’s ...
2
votes
0
answers
451
views
Building VS Code extension with ES modules by coding the extension activator as CommonJS
This is my first VS Code extension and first code written in TypeScript. While I know support of ES Module extensions is still unsupported, I decided to try creating the extension loader as a CommonJS ...
0
votes
1
answer
203
views
How to Debug Razor Class Library Modules Loaded at Runtime in Blazor WASM
I'm building a modular Blazor WebAssembly application where separate Razor Class Libraries "modules" are loaded as plugins at runtime. These modules are not referenced by the main Blazor ...
1
vote
1
answer
466
views
How to dynamic import chai in CommonJS?
chai latest version 5.1.2 move to ESModule. Is it possible continue use it in CommonJS file? chai is just a dev dependency in my project, used for unit test. I don't want to upgrade my modules to ...
0
votes
1
answer
535
views
Dynamic Library Import for Maps JavaScript API not working in Apps script
I'm trying to switch to the Dynamic Library Import API (from the outdated script tag). I made an example according to the documentation in a Google spreadsheet on Apps Script. As a result, I expect to ...
0
votes
2
answers
87
views
ES6 include references/dependencies in dynamic import
I have FileA that dynamically import FileB from different directory.
The dynamic import fail because FileB importing module 'lodash'.
The error show
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '...
1
vote
0
answers
32
views
load data dependent on language – can’t get dynamic javascript import to work (vanilla JS) [duplicate]
I want to load some javascript data dependent on the user’s language (not translation files). In PHP I would just go if ($lang == 'de') { include 'data-de.php'; } else { include 'data-en.php'; }, or ...
0
votes
1
answer
83
views
Polymorphic Lazy loaded Type-Safe Vue Components
How can I switch between different Vue.js components representing the same view, while ensuring type safety and lazy loading on demand?
Example scenario: you need to dynamically load several filter ...
0
votes
2
answers
480
views
Issue with Dynamic Importing of Svelte Component in JavaScript with Svelte
I'm trying to dynamically import a Svelte component in my project, but I'm encountering a TypeError when including the file extension in the variable that holds the component name.
Here is the working ...
0
votes
1
answer
60
views
how do I use a library that uses importlib and dynamic imports with pyinstaller?
So I am trying to build a GUI app and works well, so I decided to turn it into an exe.
but got the good old error at runtime, which after some research I identified as a problem with one of the ...
1
vote
0
answers
98
views
Cannot render/import lineicons-react package as expected using Next.JS framework
Expecting the LineIcons component to render in the tsx component as per the documentation, but it is not rendering. The LineIcons component is imported from the lineicons-react package. I am using ...