Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e85c56a

Browse filesBrowse files
committed
small tweaks
1 parent 5b3d775 commit e85c56a
Copy full SHA for e85c56a

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ It allows you to write your components in this format:
3535
- [Template Pre-Processors](#template-pre-processors)
3636
- [Style Imports](#style-imports)
3737
- [Asset URL Handling](#asset-url-handling)
38-
- [Scoped Styles](#scoped-styles)
38+
- [Scoped CSS](#scoped-css)
3939
- [Hot Reload](#hot-reload)
4040
- [Advanced Loader Configuration](#advanced-loader-configuration)
4141
- [ES6 with Babel Example](#example-using-es6-with-babel)
@@ -114,7 +114,7 @@ For example, `url(image.png)` will be translated into `require('./image.png')`.
114114

115115
For more details, see the respective documentations for [vue-html-loader](https://github.com/vuejs/vue-html-loader) and [css-loader](https://github.com/webpack/css-loader).
116116

117-
## Scoped Styles
117+
## Scoped CSS
118118

119119
> Experimental
120120

‎lib/loader.js

Copy file name to clipboardExpand all lines: lib/loader.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = function (content) {
122122
process.env.NODE_ENV !== 'production' &&
123123
(parts.script.length || parts.template.length)
124124
) {
125-
var hotReloadAPIPath = require.resolve('vue-hot-reload-api').replace(/\\/g, '\\\\')
125+
var hotReloadAPIPath = JSON.stringify(require.resolve('vue-hot-reload-api'))
126126
var scriptString = parts.script.length ? getRequireString('script', parts.script[0], 0) : ''
127127
var templateString = parts.template.length ? getRequireString('template', parts.template[0], 0, hasLocalStyles) : ''
128128
var accepted = []
@@ -137,7 +137,7 @@ module.exports = function (content) {
137137
'(function () {\n' +
138138
// shim the component directive so that it
139139
// registers the instances
140-
'var hotAPI = require("' + hotReloadAPIPath + '")\n' +
140+
'var hotAPI = require(' + hotReloadAPIPath + ')\n' +
141141
'hotAPI.install(require("vue"))\n' +
142142
'if (!hotAPI.compatible) return\n' +
143143
'var id = module.exports.hotID = ' + (scriptString || templateString) + '\n' +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.