Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

crash when require module with dash #113

Open
birhoff opened this issue Nov 26, 2015 · 1 comment
Open

crash when require module with dash #113

birhoff opened this issue Nov 26, 2015 · 1 comment

Comments

@birhoff
Copy link

birhoff commented Nov 26, 2015

If I require module with dash, like this:

{
sourceSuffixes: ['bemtree.js', 'bemtree'],
lang: '{lang}',
requires: {
    'my-module': {
        commonJS: path.resolve(__dirname + '/../my-module')
     }
}

I've got a crash, when try to require compiled bemtree in my App:

my-module: require("some/path/my-module")});
    ^

SyntaxError: Unexpected token -
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:404:25)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    // my code here
@arikon
Copy link
Member

arikon commented Nov 27, 2015

@birhoff Could you provide a PR with a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants