MCPcopy Index your code
hub / github.com/webpack/css-loader / import

Function import

src/plugins/postcss-import-parser.js:204–235  ·  view source on GitHub ↗
(atRule)

Source from the content-addressed store, hash-verified

202 return {
203 AtRule: {
204 import(atRule) {
205 if (options.isCSSStyleSheet) {
206 options.loaderContext.emitError(
207 new Error(
208 atRule.error(
209 "'@import' rules are not allowed here and will not be processed",
210 ).message,
211 ),
212 );
213
214 return;
215 }
216
217 const { isSupportDataURL, isSupportAbsoluteURL } = options;
218
219 let parsedAtRule;
220
221 try {
222 parsedAtRule = parseNode(atRule, "params", {
223 isSupportAbsoluteURL,
224 isSupportDataURL,
225 });
226 } catch (error) {
227 result.warn(error.message, { node: error.node });
228 }
229
230 if (!parsedAtRule) {
231 return;
232 }
233
234 parsedAtRules.push(parsedAtRule);
235 },
236 },
237 async OnceExit() {
238 if (parsedAtRules.length === 0) {

Callers

nothing calls this directly

Calls 1

parseNodeFunction · 0.85

Tested by

no test coverage detected