Skip to content

Issue when requiring is.js with webpack #100

@jonrh

Description

@jonrh

Just came across a weird issue when trying to require is.js when using the module bundler webpack. In JavaScript I do:

var is = require("is_js");

When using webpack this causes webpack to freak out and give an error message like this:

ERROR in ./~/is_js/is.js
Module not found: Error: Cannot resolve module 'is' in C:\jonrh\isjs-webpack-bugExample\node_modules\is_js
 @ ./~/is_js/is.js 8:8-13:10

I'm not entirely sure where the fault is but I suspect it has something to do with is.js and AMD module loading. Maybe even webpack.

I created a repository with some sample code and documentation to reproduce this issue. Included in the repository is a very hacky way to prevent this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions