From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/vue-style-loader/README.md | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 node_modules/vue-style-loader/README.md (limited to 'node_modules/vue-style-loader/README.md') diff --git a/node_modules/vue-style-loader/README.md b/node_modules/vue-style-loader/README.md new file mode 100644 index 00000000..e6b41d32 --- /dev/null +++ b/node_modules/vue-style-loader/README.md @@ -0,0 +1,47 @@ +# vue-style-loader [![Build Status](https://circleci.com/gh/vuejs/vue-style-loader/tree/master.svg?style=shield)](https://circleci.com/gh/vuejs/vue-loader/tree/master) [![npm package](https://img.shields.io/npm/v/vue-style-loader.svg)](https://www.npmjs.com/package/vue-style-loader) + +This is a fork based on [style-loader](https://github.com/webpack/style-loader). Similar to `style-loader`, you can chain it after `css-loader` to dynamically inject CSS into the document as style tags. However, since this is included as a dependency and used by default in `vue-loader`, in most cases you don't need to configure this loader yourself. + +## Options + +- **manualInject** (3.1.0+): + + Type: `boolean`. When importing the style from a non-vue-file, by default the style is injected as a side effect of the import. When `manualInject` is true, the imported style object exposes a `__inject__` method, which can then be called manually at appropriate timing. If called on the server, the method expects one argument which is the `ssrContext` to attach styles to. + + ``` js + import styles from 'styles.scss' + + export default { + beforeCreate() { // or create a mixin for this purpose + if(styles.__inject__) { + styles.__inject__(this.$ssrContext) + } + } + + render() { + return
Hello World
+ } + } + ``` + + Note this behavior is enabled automatically when `vue-style-loader` is used on styles imported within a `*.vue` file. The option is only exposed for advanced usage. + +- **ssrId** (3.1.0+): + + Type: `boolean`. Add `data-vue-ssr-id` attribute to injected `