Comments (5)
I'm tinkering with this over at patternfly/patternfly-elements#2655. I think this will need some chin-scratching in order to work with typescript via esbuildPlugin.
My current error is
JspmError: Module not found: file:///home/bennyp/Developer/patternfly/node_modules/@patternfly/elements/pf-button/pf-button.js
I believe this requires more hooks into JSPM generator, since I have not yet seen a way to tell generator to parse typescript files.
Either I'm holding it wrong (likely), or JSPM generator needs a patch or two in order to support the workflow
Additionally, I'm unaware of reliable tools to resolve local monorepo (workspaces) directories, so i'll have to hack one together on my own with glob
from web.
I like this idea in general, mainly because it should improve the debugging experience even further.
But the potential caveat is: how do we know in advance what to include in the importmap?
- shall we analyze the entire dependencies tree of all entry point modules before serving the html?
- shall we cache all node_modules importmap and use that instead?
- how do we make this performant as compared to current behavior?
I think dynamic importmaps are not implemented / under discussion now, so it's not really possible to one-by-one inject newly identified bare modules over Web Sockets or smth, but even if it was possible, that would be even more perf cost as compared to current behavior, so I'd rather not go there.
Happy to discuss the details.
from web.
There are some interesting community plugins which might help to explore this idea https://github.com/WICG/import-maps#community-polyfills-and-tooling
from web.
JSPM CLI (jspm link index.html -p nodemodules -o index.html
) does exactly what I mean (can use an HTML file as an entry point, generates only required import maps, then injecting the import map output back into the HTML file). The only inconvenience is that this command has to be run manually every time.
Can we use @jspm/generator
in @web/dev-server
?
This is the low-level core library for working with import map generation that's used under the hood in the JSPM CLI.
from web.
+1 on this feature, we ran into some weird edge cases using --node-resolve
. I think that Web Test Runner should opt purely into generating an import map, and use as little transpilation as possible, relying on web tech instead.
from web.
Related Issues (20)
- How to import HTML file using esbuild's text loader?
- Sinon Chai calledWithMatch causes structuredClone to error in the test runner HOT 11
- Using Istanbul for instrumentation (instead of V8) HOT 4
- Coverage report is not correct when Rollup Inject is used HOT 4
- junit report is empty even with successful tests HOT 2
- web
- Cannot run tests on a Remote Selenium Grid
- Sonar and Junit support for Angular with multiple modules
- Test Runner: `sinon-chai` failures not picked up HOT 1
- Config loader: test fails since Node v22.7.0
- No launch error output using Playwright + summaryReporter HOT 1
- [@web/test-runner]: Logging complex (including circular) objects brings tests to a near-halt HOT 1
- Tests do not finish or hangs when asserting window - structuredClone errors HOT 4
- `visualDiff` of `@web/test-runner-visual-regression` can't be imported
- [dev-server] Configure what browser should be used when --open is used.
- Coverage reporter configuration improvements
- visibilityState no longer works with concurrency>1 after chrome 120
- DeprecationWarning and SyntaxError with `@open-wc/semantic-dom-diff` in `web-test-runner
- `summaryReporter` doesn't print main testSuite when there are nested testSuites HOT 3
- issues and PRs need some love
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 web.