Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You had better make example. #19

Open
konojunya opened this issue Jul 25, 2017 · 0 comments
Open

You had better make example. #19

konojunya opened this issue Jul 25, 2017 · 0 comments

Comments

@konojunya
Copy link

konojunya commented Jul 25, 2017

webpack.config.js

var webpack = require("webpack")
var path = require("path")

module.exports = {
  resolve: {
    extensions: ['.js', '.jsx']
  },
  entry: __dirname + "/src/app.js",
  output: {
    path: __dirname + "/dist",
    filename: 'bundle.js',
    libraryTarget: "umd"
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: "babel-loader",
        exclude: "/node_modules/",
        query: {
          presets: ["es2015","react","stage-0"]
        }
      }
    ]
  },
  plugins: [
    new webpack.DefinePlugin({ "global.GENTLY": false }),
  ]
};

src/app.js

import React from "react";
import ReactDOM from "react-dom";
import a11y from "react-a11y-alt";

a11y(React,ReactDOM, {
    rules: {
        'img-uses-alt': 'warn'
    }
});

import App from "./components/App.jsx";

ReactDOM.render(
    <App/>,
    document.getElementById("react")
)

src/components/App.jsx

import React from "react";

export default class App extends React.Component {

    render(){
        return(
            <div>
                <img src="hoge.png" />
                <h1>Desktop</h1>
            </div>
        )
    }

}

not working a11y. why? :(

please simple example code in example/

@konojunya konojunya changed the title You had better make exsample. You had better make example. Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants