Commit Graph

27 Commits

Author SHA1 Message Date
Edimar Cardoso
2a3b3ef9da Create async method CssTools.minifyCssAsync to replace method CssTools.minifyCss in future 2022-07-27 18:03:46 -03:00
Denilson
07634c356f Merge pull request #11990 from banjerluke/devel
Pass on the real postcss error message if processing fails
2022-03-28 16:25:43 -04:00
Luke
7f3a5a73d1 Pass on the real postcss error message if processing fails 2022-03-28 12:02:04 -07:00
zodern
31368248d1 Remove console.log when postcss is disabled 2022-03-26 21:57:01 -05:00
zodern
681893ebfe Convert path to os path for postcss 2022-03-26 21:46:54 -05:00
zodern
93eedb5cea Allow minifiers to get source path of file 2022-02-28 14:00:28 -06:00
zodern
f1d8494156 Add excludedMeteorPackages postcss option 2022-02-09 12:37:41 -06:00
zodern
0e85386de3 Support postcss dependency messages 2022-02-08 23:12:29 -06:00
zodern
dc3c6b42a4 Show full stack for unexpected errors from postcss 2022-02-08 22:24:40 -06:00
zodern
92ba7c23fa Fix return value when stringifiedCss is empty 2022-02-08 22:23:18 -06:00
zodern
b6b0a96fa9 Remove source mapping url before running postcss 2022-02-08 22:18:35 -06:00
zodern
db3a005f81 Fix logging postcss warnings 2022-02-08 22:17:32 -06:00
zodern
334fd28500 Run postcss plugins 2022-02-08 20:09:20 -06:00
zodern
81e3d7864b Run postcss plugins 2022-02-08 19:32:28 -06:00
zodern
890e6db5c9 Load postcss config 2022-02-08 15:11:58 -06:00
zodern
6cc35b7783 Cache minified stylesheets 2022-02-01 18:53:10 -06:00
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