Skip to content

Convert to ES modules #1130

Description

@jaylinski

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Library is exposed as a CommonJS module.

What is the expected behavior?

Library is exposed as ES6 module.

Why do I want this behavior?

I only want to ship the raven-js library in the first few days after releasing a new feature. After that, I want to get rid of the 20KB raven-js library in order to improve the performance of my app.

In order to remove the 20KB raven-js library, I want to to use the webpack "es6-tree-shaking/uglify-js-dead-code-removal" feature.

import { Raven, RavenVue } from './es6/raven';

if (FLAGS.SENTRY_ENABLE) {
    Raven.config(CONFIG.SENTRY_DSN).addPlugin(RavenVue, Vue).install();
}

This is only possible when using ES6 modules.

Any plans on converting to es modules? Would you accept a PR?

Thanks for you feedback!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions