svelte-preprocess
Version:
A Svelte preprocessor wrapper with baked-in support for commonly used preprocessors
19 lines (18 loc) • 760 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.globalStyle = void 0;
const globalStyle = () => {
return {
async style({ content, attributes, filename }) {
const { transformer } = await import('../transformers/globalStyle.js');
if (!attributes.global) {
return { code: content };
}
return transformer({ content, filename, attributes });
},
};
};
exports.globalStyle = globalStyle;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = globalStyle;