Skip to content

[Bug] 使用 SystemJS 打包后运行出错 #272

Closed
@WOSHIZHAZHA120

Description

@WOSHIZHAZHA120
2024-04-28.19-32-23.mp4

视频内容: 我复制了两份一样的代码分别到 暴力猴脚本猫, 暴力猴 执行时无任何错误, 但是 脚本猫 执行时 报错 e.hasOwnProperty is not a function

另外为了防止偶然性也在火狐测试了一遍, 问题依旧

测试代码

// ==UserScript==
// @name         test
// @version      1.1.4
// @match        *://*.*/*
// @require      https://fastly.jsdelivr.net/npm/systemjs@latest/dist/system.min.js
// @require      https://fastly.jsdelivr.net/npm/systemjs@latest/dist/extras/named-register.min.js
// @require      data:application/javascript,%3B(typeof%20System!%3D'undefined')%26%26(System%3Dnew%20System.constructor())%3B
// ==/UserScript==

System.register("./__entry.js", ['./main-CehIb9PK-3Kt3SUhF.js'], (function(exports, module) {
    'use strict';
    return {
        setters: [null],
        execute: (function() {



        })
    };
}));

System.register("./main-CehIb9PK-3Kt3SUhF.js", [], (function(exports, module) {
    'use strict';
    return {
        setters: [null],
        execute: (function() {
            console.log(1)
        })
    };
}))

System.import("./__entry.js", "./");

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions