提交 b5c06172 编写于 作者: fxy060608's avatar fxy060608

wip(uts): compiler

上级 f58ef58f
...@@ -718,7 +718,7 @@ function initTriggerEvent(mpInstance) { ...@@ -718,7 +718,7 @@ function initTriggerEvent(mpInstance) {
function initMiniProgramHook(name, options, isComponent) { function initMiniProgramHook(name, options, isComponent) {
if (isComponent) { if (isComponent) {
// fix by Lxh 字节自定义组件Component构造器文档上写有created,但是实测只触发了lifetimes上的created // fix by Lxh 字节自定义组件Component构造器文档上写有created,但是实测只触发了lifetimes上的created
options = options.lifetimes; options = options.lifetimes || {};
} }
const oldHook = options[name]; const oldHook = options[name];
if (!oldHook) { if (!oldHook) {
......
...@@ -3662,7 +3662,7 @@ function generateCodeFrameSourceMapConsumer(consumer, m, options = {}) { ...@@ -3662,7 +3662,7 @@ function generateCodeFrameSourceMapConsumer(consumer, m, options = {}) {
return { return {
type: m.type, type: m.type,
file: options.sourceRoot file: options.sourceRoot
? normalizePath(path__default["default"].relative(options.sourceRoot, res.source)) ? normalizePath(path__default["default"].relative(options.sourceRoot, res.source.replace('\\\\?\\', '')))
: res.source, : res.source,
line: res.line, line: res.line,
column: res.column, column: res.column,
......
...@@ -3645,7 +3645,7 @@ function generateCodeFrameSourceMapConsumer(consumer, m, options = {}) { ...@@ -3645,7 +3645,7 @@ function generateCodeFrameSourceMapConsumer(consumer, m, options = {}) {
return { return {
type: m.type, type: m.type,
file: options.sourceRoot file: options.sourceRoot
? normalizePath(path.relative(options.sourceRoot, res.source)) ? normalizePath(path.relative(options.sourceRoot, res.source.replace('\\\\?\\', '')))
: res.source, : res.source,
line: res.line, line: res.line,
column: res.column, column: res.column,
......
...@@ -101,7 +101,12 @@ export function generateCodeFrameSourceMapConsumer( ...@@ -101,7 +101,12 @@ export function generateCodeFrameSourceMapConsumer(
return { return {
type: m.type, type: m.type,
file: options.sourceRoot file: options.sourceRoot
? normalizePath(path.relative(options.sourceRoot, res.source)) ? normalizePath(
path.relative(
options.sourceRoot,
res.source.replace('\\\\?\\', '')
)
)
: res.source, : res.source,
line: res.line, line: res.line,
column: res.column, column: res.column,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册