Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

bug: require.config #134

Closed
taoqf opened this issue May 9, 2017 · 1 comment
Closed

bug: require.config #134

taoqf opened this issue May 9, 2017 · 1 comment
Assignees
Milestone

Comments

@taoqf
Copy link

taoqf commented May 9, 2017

Bug / Enhancement
I could not require a module which name contains /.

Package Version: 2.0.0-beta.9

Code

I have 2 modules, one named @mymodule/A, and the other named @mymodule/B, and they both are published to npm.

- A
  a.js
 - umd
   a.js
- B
  b.js
 - umd
   b.js

I import them in @mymodule/C/c.ts

import * as a from '@mymodule/A/a';
import * as b from '@mymodule/B/b';

Then, I would like use the umd file.

require.config({
  baseUrl: './node_modules',
  packages:[{
    name: '@mymodule/A',
    location: './@mymodule/A/umd/'
  },{
    name: '@mymodule/B',
    location: './@mymodule/B/umd/'
  }]
});

Expected behavior:

I thought it would require file: /node_modules/@mymodule/A/umd/a.js and file /node_modules/@mymodule/B/umd/b.js;

Actual behavior:

The loader just ignored the config and require the file: /node_modules/@mymodule/A/a.js and file /node_modules/@mymodule/B/b.js;

@dylans dylans added this to the 2017.05 milestone May 9, 2017
@dylans dylans added the bug label May 9, 2017
@eheasley eheasley modified the milestones: 2017.06, 2017.05 Jun 6, 2017
@dylans dylans modified the milestones: 2017.06, 2017.07 Jul 4, 2017
@kitsonk kitsonk added the beta3 label Jul 27, 2017
@kitsonk kitsonk modified the milestones: 2017.08, 2017.07 Jul 27, 2017
rorticus added a commit to rorticus/loader that referenced this issue Jul 31, 2017
rorticus added a commit to rorticus/loader that referenced this issue Aug 1, 2017
rorticus added a commit to rorticus/loader that referenced this issue Aug 1, 2017
rorticus added a commit to rorticus/loader that referenced this issue Aug 1, 2017
rorticus added a commit that referenced this issue Aug 1, 2017
* Adding support for npm namespaces, issue #134

* Adding functional test for @ package, issue #134

* Fixing support for @ root packages, issue #134

* Improving package check, issue #134
@rorticus
Copy link
Contributor

rorticus commented Aug 9, 2017

Resolved with #143

@rorticus rorticus closed this as completed Aug 9, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants