UNPKG

@quasar/app-webpack

Version:

Quasar Framework App CLI with Webpack

24 lines (19 loc) 501 B
module.exports = function exports(content) { if (content.indexOf('$') !== -1) { const { prefix } = this.getOptions() const useIndex = Math.max( content.lastIndexOf('@use '), content.lastIndexOf('@forward ') ) if (useIndex === -1) { return prefix + content } const newLineIndex = content.indexOf('\n', useIndex) + 1 return ( content.substring(0, newLineIndex) + prefix + content.substring(newLineIndex) ) } return content }