Skip to content

Commit 274b787

Browse files
committed
export messages
1 parent 2736767 commit 274b787

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/loader.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ function loader(src) {
5151
rewrite: false,
5252
namer: (filename, localName) =>
5353
getLocalName(filename, localName, this, options),
54-
processing: [require('./plugins/icss-import-export')].concat(
55-
options.processing,
56-
),
54+
processing: [require('./plugins/icss-import-export')]
55+
.concat(options.processing)
56+
.filter(Boolean),
5757
});
5858
}
5959

@@ -64,6 +64,7 @@ function loader(src) {
6464
const { result } = details;
6565

6666
cb(null, result.css, result.map, {
67+
messages: result.messages,
6768
ast: {
6869
type: 'postcss',
6970
version: result.processor.version,

lib/plugins/icss-import-export.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ module.exports = (css, { opts, messages }) => {
4646
),
4747
}),
4848
);
49+
50+
messages.push({
51+
type: 'css-module-loader',
52+
plugin,
53+
imported,
54+
exported,
55+
});
4956
};
5057

5158
module.exports.postcssPlugin = plugin;

0 commit comments

Comments
 (0)