New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[es-dev-serve] serving the build version doesn't work on IE11 while keeping external dependencies #805
Comments
|
I've been debugging this problem for a bit. Im a bit confused on why you'd use So I guess in a way this may be a bug in the dev server (specifically the problem seems to be in the es module lexer as far as I can see, on this line. The lexer seems to return something completely different when the request comes from ie than from chrome, which makes sense somewhat, but maybe @LarsDenBakker knows some more about this) but the real problem is you now have bare module specifiers in your build output, which don't work on any browser (unless you're using import maps, but thats not a standard yet) |
|
Hi Pascal, thank you for looking into it. In my real world example, some components will be importing others, but they won't all live in the same repository. For the sake of this example, I assumed For my example to be complete and more representative, all imported modules have to be compiled to ES5/amd (they're not), but as you said, I have come to the conclusion a front end server with a module resolver would be necessary to achieve what I need. When using the flag Moving forward, we will focus more on an architecture based on a component catalog instead. |
|
What you're doing is fine, but you need some way to provide lit-element at runtime. Because you have the This doesn't work on IE11, because there you're not loading es modules but a systemjs build of your application. The You'd have to think about how you're going to provide lit-element at runtime, and use that to run the build. For example you could use import maps, they're polyfillable using |
|
Thanks for the input! I have a much clearer idea now about what's wrong with the code 👍 |
Steps to reproduce
test-wcnpm init @open-wc --type scaffold --scaffoldType wc --features --tagName test-wc --writeToDisk true --installDependencies npm2.1. Add
rimraf,rollupand@open-wc/building-rollup2.2. Add a trivial
index.htmlat the root to satisfy the build process:2.3. Add a compatibility rollup config file
rollup.config.jsto the root, keepinglit-htmlandlit-elementas external dependencies:2.4. Add a script to build the wc and another one to serve it, in
package.json:npm run build && npm run start:buildThe text was updated successfully, but these errors were encountered: