Skip to content

Uncaught ReferenceError: require is not defined in JavaScript Module (0.11.0) #811

Description

@damon-murdoch

When using the Unpkg release on the client-side as follows:

<!-- Pokemon Data Layer -->
<!-- <script src="dist/data.min.js"></script> -->
<script src="https://unpkg.com/@smogon/calc@0.11.0/dist/data/production.min.js"></script>

<!-- Pokemon Calcs Library -->
<!-- <script src="dist/calc.min.js"></script> -->
<script src="https://unpkg.com/@smogon/calc@0.11.0/dist/production.min.js"></script>

I get the following issue:

Uncaught ReferenceError: require is not defined

It appears that in the raw calc module, there is the following section J=require("./desc") which prevents the module from loading successfully

I haven't seen any other issues related to this, so could be an issue I can fix on my end - Let me know :)

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions