MandarinConLaBarba / react-tree-menu

A stateless tree menu component for React.
http://mandarinconlabarba.github.io/react-tree-menu/example/index.html
MIT License
170 stars 51 forks source link

Provided babelified components as part of npm prepublish #23

Open swillard-r7 opened 8 years ago

swillard-r7 commented 8 years ago

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.

diegokogan commented 8 years ago

+1

raymondlukanta commented 8 years ago

+1

mwong38 commented 8 years ago

+1

Nidroide commented 8 years ago

+1

Wilfred commented 8 years ago

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');
      },