React.js提取为Google空白

时间:2018-12-31 10:50:42

标签: reactjs google-search-console

实际上,我不知道为什么我的网站在google fetch render中是空白的。 我正在使用React Router 4和Webpack 4构建文件。

这是我的webpack:

  mode:'production', //production //development
  entry: "./src/app.js",     
  output: {
    path: path.resolve(__dirname, 'public'),
    filename: 'bundle.js'
  },
  devServer: {
    publicPath: "/",
    contentBase: "./public",
    hot: true
  },

这是我的应用程序文件:

import 'babel-polyfill';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import {
    BrowserRouter as Router,
    Route,
    Switch,
    withRouter
} from 'react-router-dom';
import Detail from '../components/Detail';
import Blog from '../components/Blog';
import Popular from '../components/Popular';
import Categories from '../components/Categories';
import Feature from '../components/feature';
import Header from '../components/Header';
import Category from '../components/Category';
import Page from '../components/Page';
import Search from '../components/Search';
import Register from '../components/Register';
import { browserHistory } from 'react-router';
import $ from 'jquery';

//Redux
import { Provider } from 'react-redux'; 
import store from './store'; 

每个人都可以告诉我我在做什么错吗?

0 个答案:

没有答案