Skip to content

Move react_ujs to es module flow #1340

@honia19

Description

@honia19

I don't have any bugs but I caught a problem when we decided to move our app to module flow we have seen a problem with require especially in the server_render.js file. We are using mixed js and ts

var componentRequireContext = require.context('components', true);
var ReactRailsUJS = require('react_ujs');
ReactRailsUJS.useContext(componentRequireContext);

Is it possible to move this code to ES module approach? Who is faced with this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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