Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const context = new ThemeContext(files, srcContext);
for(const name of Object.keys(COMPONENTS)) {
const compPath = COMPONENTS[name];
if(!context.has(`./${compPath}`, "./src/theme")) {
throw new ThemeFileNotFoundError(compPath);
}
const ex = context.require(`./${compPath}`, "./src/theme").default;
const injectStyle = () => {
addStylesClient(ex.options.scopeId, ex.allCss, true, ex.options);
};
const Component = normalizeComponent(
ex.mExports,
{
render: ex.render,
staticRenderFns: ex.staticRenderFns
},
false,
injectStyle,
ex.options.scopeId,
null
);
Vue.component(name, Component.exports);
}
context.require("./global.sass", "./src/theme");
}