-
Notifications
You must be signed in to change notification settings - Fork 387
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
chore(integration-karma): fix sourcemaps #3875
Conversation
const { rollup } = require('rollup'); | ||
const replace = require('@rollup/plugin-replace'); | ||
const MagicString = require('magic-string'); | ||
const { init, parse } = require('es-module-lexer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched from using Rollup to using magic-string
and es-module-lexer
to transform ESM into IIFE.
This new method should be a lot faster, since we really don't need all of Rollup just to transform our framework files (e.g. engine-dom/dist/index.js
). These files don't have any imports, and just need some light editing to replace some strings and convert ESM to IIFE.
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report-combined | ||
path: ./packages/@lwc/integration-karma/coverage/combined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might as well upload the combined coverage files, especially now that the HTML actually works.
Details
This fixes sourcemaps in the Karma tests. I confirmed that you can actually set breakpoints in
engine-dom
usingkarma start
, and that the Istanbul coverage HTML reports actually work now:Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?