Skip to content

bug: require.config #134

@taoqf

Description

@taoqf

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;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions