Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.forEach(asset => {
const absPath = makeAbsolute(
asset,
(this.compilation as any).options.context,
path.dirname(state.module.resource)
);
state.module.buildInfo.fileDependencies.add(absPath);
state.module.addDependency(new StylableAssetDependency(absPath));
});
const onUrl = (node: any) => {
if (isAsset(node.url)) {
const resourcePath = makeAbsolute(node.url, root, moduleDir);
const module = this.compilation.modules.find(_ => _.resource === resourcePath);
if (module) {
replacements.push(module);
this.rewriteUrl(node, replacements.length - 1);
} else {
node.url = resourcePath;
this.compilation.warnings.push(`Stylable missing asset: ${resourcePath}`);
}
}
};
outputAst.walkDecls((decl: postcss.Declaration) =>