-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move plugin to separate file commit plugin file set map to null
- Loading branch information
Joe Morgan
committed
Sep 4, 2020
1 parent
10060d9
commit 549caa2
Showing
4 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
16 changes: 16 additions & 0 deletions
16
snowpack/src/rollup-plugins/rollup-plugin-strip-source-mapping.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {Plugin} from 'rollup'; | ||
|
||
/** | ||
* rollup-plugin-strip-source-mapping | ||
* | ||
* Remove any lingering source map comments | ||
*/ | ||
export function rollupPluginStripSourceMapping(): Plugin { | ||
return { | ||
name: 'snowpack:rollup-plugin-strip-source-mapping', | ||
transform: (code) => ({ | ||
code: code.replace(/\/\/+#\s*sourceMappingURL=.+$/gm, ''), | ||
map: null, | ||
}), | ||
}; | ||
} |
This file contains 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
Oops, something went wrong.