Skip to content

Support Babel 7's @babel/plugin-proposal-decorators in modern mode #72

@matthewadams

Description

@matthewadams

[email protected] fails when using @babel/plugin-proposal-decorators@>=7.1.6 in a pure JavaScript project. The workaround is to set the plugin's legacy property to true.

Since the modern (legacy: false) mode of the plugin is now the default and closer to the expected final version of the ECMAScript decorators proposal, aspect.js should be updated accordingly to work with the plugin's modern mode. For backward compatibility, there should probably be an aspect.js setting to opt-in to using the modern decorator mode. The next major version of aspect.js could then be changed to use the modern mode by default.

The project at https://github.com/matthewadams/aspect.js-babel7-poc can be used as a pure JavaScript test client for such an environment for integration testing.

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