You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/preprocess/samples/dependencies/_config.js

16 lines
295 B

export default {
preprocess: {
style: ({ content }) => {
const dependencies = [];
const code = content.replace(/@import '(.+)';/g, (match, $1) => {
dependencies.push($1);
return '/* removed */';
});
return { code, dependencies };
}
},
dependencies: ['./foo.css']
};