Repository navigation
chore: replace source-map with source-map-js - #6556
Merged
Merged
Conversation
Contributor
|
why does rollup need a bump? |
Contributor
Author
|
Hm... I didn't touch rollup. Though rebased from december branch. Will try to revert. |
source-map-js is a js fork with applied optimisations comparable with rust optimisation in latest source-map versions. Staying on js allows us to bundle package and not increase install size. As a bonus I added support for importing from lib directly so we could avoid bundling whole package. See 7rulnik/source-map-js#13 ``` du -ck dist/node ``` before: 4164 kB after: 4140 kB
TrySound
force-pushed
the
source-map-js
branch
from
January 18, 2022 20:24
80e0e74 to
7c3aca5
Compare
TrySound
commented
Jan 18, 2022
Shinigami92
approved these changes
Jan 18, 2022
patak-cat
approved these changes
Jan 18, 2022
Member
|
I need GitHub to let us add the 🔥 emoji as reactions |
aleclarson
reviewed
Feb 12, 2022
| import type { ModuleGraph } from './moduleGraph' | ||
| import { performance } from 'perf_hooks' | ||
| import { SourceMapConsumer } from 'source-map' | ||
| import { SourceMapConsumer } from 'source-map-js/lib/source-map-consumer' |
Member
There was a problem hiding this comment.
There's no typing for this import :(
Member
There was a problem hiding this comment.
Looks like we don't need the /lib/source-map-consumer part, as source-map-js main module exports SourceMapConsumer too.
Contributor
Author
There was a problem hiding this comment.
This is done on purpose to reduce bundle size.
aleclarson
pushed a commit
to aleclarson/vite
that referenced
this pull request
Feb 12, 2022
source-map-js is a js fork with applied optimisations comparable with rust optimisation in latest source-map versions. Staying on js allows us to bundle package and not increase install size. As a bonus I added support for importing from lib directly so we could avoid bundling whole package. See 7rulnik/source-map-js#13 ``` du -ck dist/node ``` before: 4164 kB after: 4140 kB
10 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
source-map-js is a js fork with applied optimisations comparable with
rust optimisation in latest source-map versions.
Staying on js allows us to bundle package and not increase install size.
As a bonus I added support for importing from lib directly so we could
avoid bundling whole package. See 7rulnik/source-map-js#13
before: 4164 kB
after: 4140 kB
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).