Skip to content

Move react_ujs to es module flow #1340

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?

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions