首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >子目录的SystemJS包配置路径映射

子目录的SystemJS包配置路径映射
EN

Stack Overflow用户
提问于 2017-11-26 05:29:58
回答 0查看 376关注 0票数 0

我正在为systemjs映射路径而苦苦挣扎。

下面是我当前的配置。我想让@angular-redux/form/dist/source/connect成为@angular-redux/form/dist/source/connect/index.js

但它一直指向@angular-redux/form/dist/source/connect.js

我假设我写的地图不正确,或者我应该使用meta…有人能帮我介绍一下吗?

代码语言:javascript
复制
'use strict';
/**
 * System configuration for Angular samples
 * Adjust as necessary for your application needs.
 */
(function () {
  System.config({
    paths: {
      // paths serve as alias
      'npm:': '../node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      "@angular-redux/form": "npm:@angular-redux/form"
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      '@angular-redux/form': {
        main: 'dist/source/index.js',
        map: {
          './connect': './connect/index.js',
          './connect-array': './connect-array/index.js'
        }
      }
    }
  });
})(this);

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47490696

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档