Skip to content

添加 base 参数支持 #26

@sorrycc

Description

@sorrycc

需求方

@hotoo

场景

服务端是 python, 静态服务器是 spm-server,不同端口,python 调 spm-server 上的 js 文件,比如:

<!-- url: http://localhost:8000/ -->
<script src="http://localhost:8002/foo/0.1.0/index.js"></script>
// index.js
require('bar/0.1.0/index.js');

问题

standalone 模式的调试会强制配置 seajs.config({'base': '/'}),导致依赖的 bar 模块会去请求 http://localhost:8000/bar/0.1.0/index.js

方案

提示 base 参数,可用于配置 seajs 的 base 。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions