@dcloudio/uni-cli-shared
Advanced tools
Comparing version 0.2.963 to 0.2.964
@@ -32,3 +32,4 @@ const tags = require('./tags') | ||
getComponentName, | ||
convertStaticStyle | ||
convertStaticStyle, | ||
devtoolModuleFilenameTemplate | ||
} = require('./util') | ||
@@ -102,3 +103,4 @@ | ||
nvueJsPreprocessOptions, | ||
nvueHtmlPreprocessOptions | ||
nvueHtmlPreprocessOptions, | ||
devtoolModuleFilenameTemplate | ||
} |
@@ -0,0 +0,0 @@ const fs = require('fs') |
@@ -90,2 +90,4 @@ const path = require('path') | ||
const sourceRoot = normalizePath(process.env.UNI_INPUT_DIR) | ||
module.exports = { | ||
@@ -119,3 +121,26 @@ md5, | ||
return str | ||
}) | ||
}), | ||
devtoolModuleFilenameTemplate (info) { | ||
let needSourceMap = false | ||
const absoluteResourcePath = normalizePath(info.absoluteResourcePath) | ||
if (absoluteResourcePath.indexOf(sourceRoot) !== -1) { | ||
if (absoluteResourcePath.endsWith('.js')) { | ||
needSourceMap = true | ||
} else if ( | ||
!info.moduleId && | ||
( | ||
absoluteResourcePath.endsWith('.vue') || | ||
absoluteResourcePath.endsWith('.nvue') | ||
) | ||
) { | ||
needSourceMap = true | ||
} | ||
} | ||
if (needSourceMap) { | ||
const filePath = normalizePath(path.relative(sourceRoot, absoluteResourcePath)) | ||
if (filePath !== 'main.js') { | ||
return `uni-app:///${filePath}` | ||
} | ||
} | ||
} | ||
} |
{ | ||
"name": "@dcloudio/uni-cli-shared", | ||
"version": "0.2.963", | ||
"version": "0.2.964", | ||
"description": "uni-cli-shared", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41945
1027
36