Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getAppStyleCode(stringifyRequest) {
if (!process.env.UNI_USING_NVUE_COMPILER) {
return ''
}
let code = 'App.appStyle = {}\n'
let styles = []
try {
if (fs.existsSync(appVuePath)) {
styles = parseComponent(fs.readFileSync(appVuePath, 'utf8')).styles
}
} catch (e) {}
styles.forEach((style, index) => {
code = code +
`Vue.prototype.__merge_style(require(${genStyleRequest(style,index,stringifyRequest)}).default,App.appStyle)\n`
})
return code
}