GithubHelp home page GithubHelp logo

Comments (3)

AdeleD avatar AdeleD commented on May 14, 2024

I don't have any error when I load react-paginate with webpack (I tried the es6 way). Could you be more precise about the error please? Maybe you can paste it here?

from react-paginate.

lyon-liao avatar lyon-liao commented on May 14, 2024

the main code as follow.

version of npm and node

node  v4.2.1
npm 2.14.7

the gulp task

gulp.task("webpack", ['copy'], function(){
  webpack({
    entry: PATHS.module_js,
    output: {
      path: path.join(__dirname, '/dist/js/'),
      filename: '[name].js'
    },
    resolve: {
      extensions: ['', '.js', '.jsx']
    },
    module: {
      loaders: [
        { test: /\.js|jsx$/,
          loader: 'babel-loader?presets[]=es2015&presets[]=react',
        }
      ]
    }
  }, function(err, stats){
    if(err) throw new gulpUtil.PluginError("webpack", err);
    var jsonStats = stats.toJson();
    if(jsonStats.errors.length > 0)
      jsonStats.errors.forEach(function(err){
        console.error(err);
      });
    if(jsonStats.warnings.length > 0)
      console.log(jsonStats.warnings);

  });
});

using the react-paginate

import ReactPaginate from 'react-paginate';

ReactDom.render(<ReactPaginate />, document.getElementById('pagination'));

and i got an error in terminal

./~/react-paginate/dist/react-paginate.js

Module build failed: ReferenceError: [BABEL] /Users/think/work/react-build-tool/node_modules/react-paginate/dist/react-paginate.js: Unknown option: /Users/think/work/react-build-tool/node_modules/react-paginate/.babelrc.stage

    at Logger.error (/Users/think/work/react-build-tool/node_modules/babel-core/lib/transformation/file/logger.js:43:11)
...
...

from react-paginate.

lyon-liao avatar lyon-liao commented on May 14, 2024

babel unknow your stage option in .babelrc file, please check it.

from react-paginate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.