How to use the vue-inbrowser-compiler-utils.addScopedStyle function in vue-inbrowser-compiler-utils

To help you get started, we’ve selected a few vue-inbrowser-compiler-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vue-styleguidist / vue-styleguidist / packages / vue-styleguidist / src / client / rsg-components / Preview / Preview.js View on Github external
const rootComponent = renderRootJsx
			? renderRootJsx.default(previewComponent)
			: { render: createElement => createElement(previewComponent) }
		try {
			new Vue({
				...extendsComponent,
				...rootComponent,
				el
			})
		} catch (err) {
			this.handleError(err)
		}

		// Add the scoped style if there is any
		if (style) {
			addScopedStyle(style, moduleId)
		}
	}
github vue-styleguidist / vue-styleguidist / packages / vue-styleguidist / src / client / rsg-components / Preview / PreviewAsync.js View on Github external
const rootComponent = renderRootJsx
			? renderRootJsx.default(previewComponent)
			: { render: createElement => createElement(previewComponent) }
		try {
			new Vue({
				...extendsComponent,
				...rootComponent,
				el
			})
		} catch (err) {
			this.handleError(err)
		}

		// Add the scoped style if there is any
		if (style) {
			addScopedStyle(style, moduleId)
		}
	}

vue-inbrowser-compiler-utils

use this with vue-inbrowser-compiler to allow jsx compilation

MIT
Latest version published 11 months ago

Package Health Score

88 / 100
Full package analysis