Skip to content

cannot require files with dynamic path anymore  #3306

@xe4me

Description

@xe4me

Please provide us with the following information:

OS?

Mac os Siera

Versions.

v1.0.0-beta-21

Hi
We used to be able to to do this :

let path = 'test.component.ts';
let file = require('./path/to/file/'+path);
console.log('file',file);

But this is not working any more with the latest cli.

This works :

let file = require('./path/to/file/test.component.ts');
console.log('file',file);

So basically , webpack wont let me require file dynamically anymore in cli .

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