rewire-entry

1.0.1 • Public • Published

rewire-entry

Rewire to change entry points of create-react-app.

Usage

const rewireEntry = require('rewire-entry');

module.exports = rewireEntry({
  entry: ['desktop.js', 'touch.js']
});

or for typescript support:

const rewireTypescript = require('react-app-rewire-typescript');
const rewireEntry = require('rewire-entry')({
  entry: ['desktop.tsx', 'touch.tsx']
});

module.exports = {
  webpack: (config, env) => {
    config = rewireTypescript(config, env);
    config = rewireEntry.webpack(config, env);

    return config;
  },
  devServer: (config, env) => {
    config = rewireEntry.devServer(config, env);

    return config;
  }
};

Package Sidebar

Install

npm i rewire-entry

Weekly Downloads

26

Version

1.0.1

License

MIT

Unpacked Size

4.66 kB

Total Files

4

Last publish

Collaborators

  • tadatuta