Commit Graph

11 Commits

Author SHA1 Message Date
seke
d726f49a85 Modernize standard-minifier-css and update dependencies 2020-10-03 10:31:28 +02:00
Ben Newman
b7267b76a1 Use null for sourcesContent[i] if sources[i] unrecognized.
Should help with #10112.
2018-10-10 16:40:19 -04:00
Ben Newman
9290ea7a06 Ignore inline source maps when minifying CSS files.
https://github.com/meteor/meteor/issues/10112#issuecomment-428646872

Further down in the mergeCss function, when we call CssTools.stringifyCss,
we pass the following option:

  // don't try to read the referenced sourcemaps from the input
  inputSourcemaps: false

Apparently this isn't enough to avoid reading inline source maps from the
input file, so we should be a bit more aggressive about preventing postcss
from picking up inline source maps.

This change mostly affects .css files imported from node_modules, and
possibly raw .css files in the application that happen to have inline
sourceMappingURL= comments. For CSS output from compiler plugins like LESS
and SCSS, we have a totally different mechanism of handling source maps,
namely file.getSourceMap().

Should fix #10112.
2018-10-10 14:13:23 -04:00
Ben Newman
281a73ddec Be sure to get original CSS contents from appropriate SourceMapConsumer.
https://github.com/meteor/meteor/pull/7877#issuecomment-252359894
2016-10-07 18:35:43 -04:00
Christian Klaussner
83b3ca7f7a Make sure only valid mappings are added to the map 2016-10-07 15:31:38 +02:00
Christian Klaussner
92bfc5f1e1 Use forEach instead of reduce 2016-10-07 15:12:52 +02:00
Christian Klaussner
00fc89b373 Rewrite source map composition for CSS files
The previous implementation had a run time quadratic in the number of CSS files with an associated source map. This new implementation has a linear run time because it iterates only once through all mappings of each CSS file.
2016-10-06 18:25:07 +02:00
Ben Newman
bfa67337dd Cache merging of CSS files in standard-minifier-css.
It's silly that this was happening on every reload, regardless of whether
CSS files had changed.
2016-09-23 19:22:40 -04:00
Ben Newman
a83f6da059 Don't minify non-web .css files.
We shouldn't be processing .css files on the server anyway, because of a
similar restriction in packages/meteor/plugin/basic-file-types.js, but
it seemed wise to enforce that restriction redundantly here.
2016-08-03 16:34:31 -04:00
Avital Oliver
eadeb72e16 Merge branch 'devel' into release-1.3 2016-02-17 12:15:51 -08:00
SEKE
d4da2957a9 Rename separated minifiers to singular name and use separate versions from 1.3 onwards. 2016-02-10 12:32:17 +01:00