Socket
Socket
Sign inDemoInstall

weex-vue-loader

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-vue-loader - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

21

lib/loader.js

@@ -212,3 +212,5 @@ // @todo: support hot reload

var parts = parse(content, fileName, this.sourceMap)
// var hasScoped = parts.styles.some(function (s) { return s.scoped })
// var hasGlobal = parts.styles.some(function (s) { return !!s.global })
// var scopeId = hasGlobal ? '@GLOBAL' : ('data-v-' + genId(filePath))
var scopeId = 'data-v-' + genId(filePath)
var output = 'var __vue_exports__, __vue_options__\n'

@@ -308,5 +310,5 @@

// attach scoped id
// if (hasScoped) {
// exports += '__vue_options__._scopeId = "' + moduleId + '"\n'
// }
if (parts.styles.length) {
exports += '__vue_options__._scopeId = "' + scopeId + '"\n'
}

@@ -325,7 +327,12 @@ // if (Object.keys(cssModules).length) {

'__vue_styles__.forEach(function (module) {\n' +
'for (var name in module) {\n' +
'__vue_options__.style[name] = module[name]\n' +
'}\n' +
' for (var name in module) {\n' +
' __vue_options__.style[name] = module[name]\n' +
' }\n' +
'})\n'
// support to register static styles
exports += 'if (typeof __register_static_styles__ === "function") {\n' +
' __register_static_styles__(__vue_options__._scopeId, __vue_styles__)\n' +
'}\n'
if (!query.inject) {

@@ -332,0 +339,0 @@ output += exports

@@ -0,1 +1,2 @@

// TODO: use weex-tempalte-compiler
var compiler = require('vue-template-compiler')

@@ -15,2 +16,3 @@ var cache = require('lru-cache')(100)

if (output) return output
// TODO: support to use "global" in <style>
output = compiler.parseComponent(content, { pad: true })

@@ -17,0 +19,0 @@ if (needMap) {

{
"name": "weex-vue-loader",
"version": "0.3.0",
"version": "0.4.0",
"description": "Vue.js component loader for Webpack",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc