Skip to content

Grunt Build barfs on JSX #121

@epmatsw

Description

@epmatsw

Using the following steps generates a non-building project, which seems strange based on the documentation.

yo react-webpack
No router, no flux, CSS, JSX
yo react-webpack:component Tester --rich
Open src/components/Bblcc3App.js and add var tester = require('./Tester.jsx').
grunt build

This fails with:

ERROR in ./src/components/Tester.jsx
Module parse failed: /Users/will/github/Mine-Temp/BBLCC3/node_modules/eslint-loader/index.js!/Users/will/github/Mine-Temp/BBLCC3/src/components/Tester.jsx Line 20: Unexpected token <
You may need an appropriate loader to handle this file type.
|   render: function () {
|     return (
|         <div className="Tester">
|           <p>Content for Tester</p>
|         </div>
 @ ./src/components/Bblcc3App.js 12:13-36
Warning: Task "webpack:dist" failed. Use --force to continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions