Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Sep 5, 2020
2 parents 4d5f0c2 + 549caa2 commit e5dfccc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
2 changes: 2 additions & 0 deletions snowpack/src/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {rollupPluginDependencyCache} from '../rollup-plugins/rollup-plugin-remot
import {rollupPluginDependencyStats} from '../rollup-plugins/rollup-plugin-stats.js';
import {rollupPluginWrapInstallTargets} from '../rollup-plugins/rollup-plugin-wrap-install-targets';
import {rollupPluginNodeProcessPolyfill} from '../rollup-plugins/rollup-plugin-node-process-polyfill';
import {rollupPluginStripSourceMapping} from '../rollup-plugins/rollup-plugin-strip-source-mapping';
import {scanDepList, scanImports, scanImportsFromFiles} from '../scan-imports.js';
import {printStats} from '../stats-formatter.js';
import {
Expand Down Expand Up @@ -350,6 +351,7 @@ ${colors.dim(
polyfillNode && rollupPluginNodePolyfills(),
...userDefinedRollup.plugins, // load user-defined plugins last
rollupPluginCatchUnresolved(),
rollupPluginStripSourceMapping(),
].filter(Boolean) as Plugin[],
onwarn(warning, warn) {
// Warn about the first circular dependency, but then ignore the rest.
Expand Down
16 changes: 16 additions & 0 deletions snowpack/src/rollup-plugins/rollup-plugin-strip-source-mapping.ts
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,
}),
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,6 @@ class TemplateInstance {
return fragment;
}
}
//# sourceMappingURL=template-XXXXXXXX.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -2525,7 +2524,6 @@ class TemplateResult {
return template;
}
}
//# sourceMappingURL=template-result.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -2995,7 +2993,6 @@ const getOptions = (o) => o &&
(eventOptionsSupported ?
{ capture: o.capture, passive: o.passive, once: o.once } :
o.capture);
//# sourceMappingURL=parts.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -3131,7 +3128,6 @@ class DefaultTemplateProcessor {
}
}
const defaultTemplateProcessor = new DefaultTemplateProcessor();
//# sourceMappingURL=default-template-processor.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand All @@ -3156,7 +3152,6 @@ if (typeof window !== 'undefined') {
* render to and update a container.
*/
const html = (strings, ...values) => new TemplateResult(strings, values, 'html', defaultTemplateProcessor);
//# sourceMappingURL=lit-html.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -4097,7 +4092,6 @@ _a = finalized;
* Marks class as having finished creating properties.
*/
UpdatingElement[_a] = true;
//# sourceMappingURL=updating-element.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -5203,7 +5197,6 @@ class TemplateInstance {
return fragment;
}
}
//# sourceMappingURL=template-XXXXXXXX.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -5309,7 +5302,6 @@ class TemplateResult {
return template;
}
}
//# sourceMappingURL=template-result.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -5779,7 +5771,6 @@ const getOptions = (o) => o &&
(eventOptionsSupported ?
{ capture: o.capture, passive: o.passive, once: o.once } :
o.capture);
//# sourceMappingURL=parts.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -5915,7 +5906,6 @@ class DefaultTemplateProcessor {
}
}
const defaultTemplateProcessor = new DefaultTemplateProcessor();
//# sourceMappingURL=default-template-processor.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand All @@ -5940,7 +5930,6 @@ if (typeof window !== 'undefined') {
* render to and update a container.
*/
const html = (strings, ...values) => new TemplateResult(strings, values, 'html', defaultTemplateProcessor);
//# sourceMappingURL=lit-html.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down Expand Up @@ -6881,7 +6870,6 @@ _a = finalized;
* Marks class as having finished creating properties.
*/
UpdatingElement[_a] = true;
//# sourceMappingURL=updating-element.js.map
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
Expand Down
Loading

0 comments on commit e5dfccc

Please sign in to comment.