react-tree-menu icon indicating copy to clipboard operation
react-tree-menu copied to clipboard

Provided babelified components as part of npm prepublish

Open swillard-r7 opened this issue 9 years ago • 5 comments

Would it be possible, as part of your build/prepublish of this project, to include the transpiled version of your components? I would like to pull in several components into my app, but I don't want to specify a babel-loader (I'm using webpack) to convert things from the node_modules directory.

swillard-r7 avatar Jan 29 '16 19:01 swillard-r7

+1

diegokogan avatar Feb 24 '16 18:02 diegokogan

+1

raymondlukanta avatar Mar 04 '16 14:03 raymondlukanta

+1

mwong38 avatar May 16 '16 11:05 mwong38

+1

neerax avatar May 24 '16 08:05 neerax

See also #19.

We worked around this by setting exclude to a function in our webpack.config.js:

  module: {
    loaders: [{
      test: /.jsx?$/,
      loader: 'babel-loader',
      exclude(file) {
        if (file.startsWith(__dirname + '/node_modules/react-tree-menu')) {
          return false;
        }
        return file.startsWith(__dirname + '/node_modules');
      },

Wilfred avatar Sep 19 '16 13:09 Wilfred