GithubHelp home page GithubHelp logo

react-love / react-latest-framework Goto Github PK

View Code? Open in Web Editor NEW
826.0 65.0 313.0 6.82 MB

a client framework of React

License: MIT License

HTML 0.56% JavaScript 93.43% CSS 6.01%
react redux react-router4 less react-hot-loader-3 react16 create-react-app happypack antd webpack4

react-latest-framework's Introduction

React技术栈脚手架(V16.8.6)

Build Status codebeat badge PRs Welcome

适用人群:该框架集成了react开发常用技术栈,适用于想要学习单向数据流框架搭建的新手、以及想要一个比较干净、简洁的框架从事前端项目的开发者。

框架集成的配置

webpack版本为4.28.4,并且对webpack相关的第三方插件进行了兼容处理

基于 create-react-app 进行改造,增加了redux、react-router、immutable等

使用react-loadable做异步路由

babel最新配置

使用happypack优化js、css构建,速度明显提升

UI框架使用的是世界第二大UI框架 �antd

(新增)你可以学习到如何在项目中使用react hooks,react-redux-hook

(新增)项目中有3个文件使用了hooks写法,分别是入口文件App.js,BaseLayout/index.js,Login.js,其余组件仍然保留class包装Connect的写法,用来做对比。

客户端渲染

本项目是客户端渲染版本,登录账号 admin , 密码 12345

clipboard.png

clipboard.png

Installation 教程

fork到你的账号,简单省事,或者 download 项目到本地

1、 安装依赖包,已经解决了一些依赖包安装最新版可能出现的bug,如果还有问题,可以看相关社区的issue。

npm install 或cnpm install 或 yarn

2、运行demo。

npm start

4、打包发布

npm run build

5、你可以尝试serve来启动服务器。

npm run serve

学习ES6语法

React项目中,使用了大量的ES6语法,如果你还没有学习过ES6,那么推荐你看 深入理解ES6笔记

如果你对该项目感兴趣,想共享一份你的力量,请大胆pull PR!

react-latest-framework's People

Contributors

hyy1115 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-latest-framework's Issues

环境问题请教

当前运行环境: development
http://localhost:3011
webpack built 420bf843335bfe5ad887 in 20156ms
有两问题请教:
1.请问编译后的文件放在哪里的,我看指定的是build目录,但是又找不到
2.改了代码之后,一般会自动编译,然后浏览器刷新,是没有配置还是我这里有问题?

为什么启动不了啊?

克隆下来了
cnpm install
cnpm run start

报:
module.js: 442
throw err:
Error: Cannot find module 'del'
...

系统: windows 10
node: v6.3.1
我没有外网,全部用的cnpm

missing script: start-win

使用npm install还原包后,在windows下面使用命令npm run start-win,报missing script: start-win

搜索页面搜索失败

打开页面提示如下:

Failed to load resource: the server responded with a status of 404 (Not Found)

操作搜索页面出现:
vendor.js:41365 Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack

操作步骤:
cnpm install 后直接运行 cnpm run start

操作系统:
mac 10.12.6

Linux ubuntu Error

ERROR in ./src/containers/Home/homeContainer.js
Module not found: Error: Can't resolve 'components/Home/Special' in '/home/fanfree/dev/boilerplate/react-redux-webpack/src/containers/Home'
@ ./src/containers/Home/homeContainer.js 49:15-49
@ ./src/appContainer.js
@ ./src/index.js
@ multi webpack-hot-middleware/client?path=http://localhost:3011/__webpack_hmr&reload=true&noInfo=false&quiet=false babel-polyfill ./src/index

ERROR in .//babel-loader/lib!./src/containers/Search/searchContainer.js
Module not found: Error: Can't resolve 'components/Search/HotSearch' in '/home/fanfree/dev/boilerplate/react-redux-webpack/src/containers/Search'
@ ./
/babel-loader/lib!./src/containers/Search/searchContainer.js 41:17-55
@ ./~/bundle-loader?lazy!./src/containers/Search/searchContainer.js
@ ./src/appContainer.js
@ ./src/index.js
@ multi webpack-hot-middleware/client?path=http://localhost:3011/__webpack_hmr&reload=true&noInfo=false&quiet=false babel-polyfill ./src/index

请教一个问题

@connect(
state => ({...state.home}),
dispatch => bindActionCreators({...home, ...global}, dispatch)
)这样写是什么意思?不是很明白

請教關於 iScroll 於 react 上之運用

您好,很抱歉由於我不會用 qq,所以使用 issue 的方式作提問 ...

日前在 react china 上看到 您的提問,但您已經自行解決了!
而我目前也碰到了類似的問題,就是在 React 中使用 iScroll 5 時無法上下滾動的問題。
我是在 componentDidMount 時作 iScroll 的初始化,也看到產生 CSS3 屬性,但就是沒有 iScroll 的效果,在 mobile 裝置上完全無法上下滾動...

如果您有相關的解法或建議,都煩請您分享一下

如果在此處發 issue 造成您的困擾,我將會立即關閉此發問。

增加html模板,动态插入js和css【原项目引用的做法不太好】

#依次替换掉原项目的index.html,package.json,webpack.config.js 重新npm i即可#

<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8" />
		<title>react15-脚手架</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" />
	</head>

	<body>
		<div id="root"></div>
	</body>

</html>
 {
  "name": "react-redux-webpack",
  "version": "1.1.0",
  "description": "",
  "scripts": {
    "str": "webpack-dev-server --config webpack.config.g.js --progress --colors",
    "dev": "webpack-dev-server",
    "lint": "eslint src",
    "pro": "set NODE_ENV=production&& webpack --progress --hide-modules --config webpack.config.js",
    "build-mac": "export NODE_ENV=production && webpack --progress --hide-modules --config webpack.config.js",
    "build-win": "set NODE_ENV=production&& webpack --progress --hide-modules --config webpack.config.js",
    "test": "jest"
  },
  "repository": {
    "type": "git",
    "url": ""
  },
  "author": "huangyongyue",
  "license": "MIT",
  "devDependencies": {
    "assets-webpack-plugin": "^3.5.1",
    "autoprefixer": "^7.1.1",
    "axios": "^0.16.2",
    "babel-cli": "^6.16.0",
    "babel-core": "^6.24.1",
    "babel-loader": "^6.4.1",
    "babel-plugin-react-transform": "^2.0.2",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.16.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-latest": "^6.16.0",
    "babel-preset-react": "^6.16.0",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-0": "^6.16.0",
    "babel-preset-stage-1": "^6.16.0",
    "babel-preset-stage-2": "^6.17.0",
    "babel-preset-stage-3": "^6.17.0",
    "bundle-loader": "^0.5.5",
    "classnames": "^2.2.5",
    "colors-cli": "^1.0.8",
    "compression": "^1.6.2",
    "css-loader": "^0.22.0",
    "eslint": "^1.9.0",
    "eslint-config-airbnb": "0.1.0",
    "eslint-plugin-react": "^3.2.3",
    "expect": "^1.12.0",
    "express": "^4.15.2",
    "extract-text-webpack-plugin": "^2.1.0",
    "file-loader": "^0.8.4",
    "http-proxy-middleware": "^0.17.4",
    "image-webpack-loader": "^3.1.0",
    "imports-loader": "^0.6.4",
    "jasmine-core": "^2.3.4",
    "jest": "^19.0.2",
    "jest-runtime": "^19.0.2",
    "less": "^2.7.1",
    "less-loader": "^2.2.2",
    "open": "0.0.5",
    "open-browser-webpack-plugin": "0.0.5",
    "postcss-loader": "^0.7.0",
    "react-test-renderer": "^15.4.2",
    "react-transition-group": "^1.1.1",
    "redux-logger": "^2.8.2",
    "redux-promise": "^0.5.3",
    "redux-thunk": "^2.2.0",
    "style-loader": "^0.13.0",
    "url-loader": "^0.5.6",
    "web-webpack-plugin": "^1.6.2",
    "webpack": "^2.6.1",
    "webpack-dev-server": "^2.4.5"
  },
  "dependencies": {
    "babel-runtime": "^6.23.0",
    "dateformat": "^2.0.0",
    "dateformat-util": "^1.0.5",
    "fastclick": "^1.0.6",
    "history": "^4.6.1",
    "prop-types": "^15.5.4",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "react-hot-loader": "^3.0.0-beta.7",
    "react-redux": "^5.0.4",
    "react-router": "^4.0.0",
    "react-router-dom": "^4.0.0",
    "react-router-redux": "^4.0.8",
    "redux": "^3.6.0",
    "redux-devtools-extension": "^2.13.0"
  }
}
var path = require('path');
var color = require('colors-cli');  //控制台颜色
var DateFormat = require('dateformat-util');  //生成构建时间
var webpack = require('webpack');
//webpack如何全局加载第三方插件可以使用webpack官方的ProvidePlugin
const AssetsPlugin = require('assets-webpack-plugin')  //在生成代码时生成一个 json 文件,其中包含了源文件和打包结果的对应关系
const WebWebpackPlugin = require('web-webpack-plugin')
const {
	WebPlugin,
	AutoWebPlugin
} = WebWebpackPlugin; //加载html模板

var ExtractTextPlugin = require('extract-text-webpack-plugin'); //引入css 单独打包插件
var OpenBrowserPlugin = require('open-browser-webpack-plugin'); //webpack 启动后自动打开浏览器
var argv = require('yargs').argv; //可以用来开发自己的命令行工具集合

const PORT=12306;    //测试环境配置自定义本地端口
const pro_sourceMap=false;   //控制生产环境sourceMap

//判断当前运行环境是开发模式还是生产模式
const nodeEnv = process.env.NODE_ENV || 'development';  //默认是测试环境
const isPro = nodeEnv === 'production';

console.log(color.red("当前运行环境:" + (isPro ? 'production' : 'development')+"    构建时间:"+(DateFormat.format(new Date()))));

var plugins = [
	new ExtractTextPlugin({ //设置生成css 的路径和文件名,会自动将对应entry入口js文件中引入的CSS抽出成单独的文件
		filename: 'css/[name].[hash:7].css'
	}),
	new webpack.optimize.CommonsChunkPlugin({
		name: 'vendor',
		minChunks: function(module) {
			// 该配置假定你引入的 vendor 存在于 node_modules 目录中
			return module.context && module.context.indexOf('node_modules') !== -1;
		}
	}),
	new webpack.DefinePlugin({
		// 定义全局变量
		'process.env': {
			'NODE_ENV': JSON.stringify(nodeEnv)
		}
	}),
	new webpack.ProvidePlugin({   //将jquery暴露给所有模块,其它模块不用再显式require('jquery')了;只要模块的代码中出现了$,webpack就会自动将jQuery注入。
           // $: 'jquery' 
    }),
	new WebPlugin({  //加载模板,插入css和js
		filename: 'index.html',
		requires: ['vendor','app'], //要加载的js文件
		template: './index.html'
	}),
	new webpack.BannerPlugin("appver:"+DateFormat.format(new Date())) //作用是给输出文件最顶部添加最后一次构建时间appver
]
var app = ['./index']
if(isPro) { //生产环境
	plugins.push(
		new webpack.optimize.UglifyJsPlugin({
			sourceMap: pro_sourceMap,     
			beautify: false,
			comments: false,
			compress: {
		        warnings: false,
		        drop_console: true,
		        collapse_vars: true,
		        reduce_vars: true
		    }
		}),
		new AssetsPlugin()  
	) 
} else { //测试环境
	app.unshift('react-hot-loader/patch', 'webpack-dev-server/client?http://localhost:'+PORT, 'webpack/hot/only-dev-server')
	plugins.push(
		new webpack.HotModuleReplacementPlugin(),
		new webpack.NamedModulesPlugin(),
		new webpack.NoEmitOnErrorsPlugin(),
		new OpenBrowserPlugin({
			url: 'http://localhost:'+PORT
		}) //自动打开浏览器
	)
}

module.exports = {
	/*
	  基础目录,绝对路径,用于从配置中解析入口起点(entry point)和加载器(loader)
	*/
	context: path.resolve(__dirname, 'src'),
	devtool: isPro ? 'source-map' : 'cheap-module-source-map',   
	entry: {
		app: app
	},
	output: {
		filename: 'js/[name].[hash:7].js',
		path: path.resolve(__dirname, 'dist'),
		publicPath: '/'
	},
	// BASE_URL是全局的api接口访问地址
	plugins,
	// alias是配置全局的路径入口名称,只要涉及到下面配置的文件路径,可以直接用定义的单个字母表示整个路径
	resolve: {
		extensions: ['.js', '.jsx', '.less', '.scss', '.css'],   // webpack2 不再需要一个空的字符串
		modules: [
			path.resolve(__dirname, 'node_modules'),
			path.join(__dirname, './src')
		]
	},


	module: {
		rules: [{
				test: /\.(js|jsx)$/,
				exclude: /(node_modules|bower_components)/,
				use: {
					loader: 'babel-loader?cacheDirectory=true'
				}
			},  {
	            test: /\.(less|css)$/,
	            use: ExtractTextPlugin.extract({   //开启css压缩
	                use: [{loader:"css-loader",options:{minimize: true}}, "less-loader", "postcss-loader"]
	            })
            }, {
				test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
				use: [
					'url-loader?limit=10240&name=img/[name].[hash:7].[ext]'
				]
			}, {
				test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
				use: [ //设置字体生成文件夹
					'url-loader?limit=10240&name=font/[name].[hash:7].[ext]'
				]
			}
		]
	},
	devServer: {
		hot: true,
		host: '127.0.0.1',
		contentBase: path.resolve(__dirname, 'dist'),
		publicPath: '/',
		port: PORT
	}
};

增加html模板,动态插入js,压缩css和js【欢迎补充】

{
  "name": "react-redux-webpack",
  "version": "1.1.0",
  "description": "",
  "scripts": {
    "str": "webpack-dev-server --config webpack.config.g.js --progress --colors",
    "dev": "webpack-dev-server",
    "lint": "eslint src",
    "pro": "set NODE_ENV=production&& webpack --progress --hide-modules --config webpack.config.js",
    "build-mac": "export NODE_ENV=production && webpack --progress --hide-modules --config webpack.config.js",
    "build-win": "set NODE_ENV=production&& webpack --progress --hide-modules --config webpack.config.js",
    "test": "jest"
  },
  "repository": {
    "type": "git",
    "url": ""
  },
  "author": "huangyongyue",
  "license": "MIT",
  "devDependencies": {
    "assets-webpack-plugin": "^3.5.1",
    "autoprefixer": "^7.1.1",
    "axios": "^0.16.2",
    "babel-cli": "^6.16.0",
    "babel-core": "^6.24.1",
    "babel-loader": "^6.4.1",
    "babel-plugin-react-transform": "^2.0.2",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.16.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-latest": "^6.16.0",
    "babel-preset-react": "^6.16.0",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-0": "^6.16.0",
    "babel-preset-stage-1": "^6.16.0",
    "babel-preset-stage-2": "^6.17.0",
    "babel-preset-stage-3": "^6.17.0",
    "bundle-loader": "^0.5.5",
    "classnames": "^2.2.5",
    "colors-cli": "^1.0.8",
    "compression": "^1.6.2",
    "css-loader": "^0.22.0",
    "eslint": "^1.9.0",
    "eslint-config-airbnb": "0.1.0",
    "eslint-plugin-react": "^3.2.3",
    "expect": "^1.12.0",
    "express": "^4.15.2",
    "extract-text-webpack-plugin": "^2.1.0",
    "file-loader": "^0.8.4",
    "http-proxy-middleware": "^0.17.4",
    "image-webpack-loader": "^3.1.0",
    "imports-loader": "^0.6.4",
    "jasmine-core": "^2.3.4",
    "jest": "^19.0.2",
    "jest-runtime": "^19.0.2",
    "less": "^2.7.1",
    "less-loader": "^2.2.2",
    "open": "0.0.5",
    "open-browser-webpack-plugin": "0.0.5",
    "postcss-loader": "^0.7.0",
    "react-test-renderer": "^15.4.2",
    "react-transition-group": "^1.1.1",
    "redux-logger": "^2.8.2",
    "redux-promise": "^0.5.3",
    "redux-thunk": "^2.2.0",
    "style-loader": "^0.13.0",
    "url-loader": "^0.5.6",
    "web-webpack-plugin": "^1.6.2",
    "webpack": "^2.6.1",
    "webpack-dev-server": "^2.4.5"
  },
  "dependencies": {
    "babel-runtime": "^6.23.0",
    "dateformat": "^2.0.0",
    "dateformat-util": "^1.0.5",
    "fastclick": "^1.0.6",
    "history": "^4.6.1",
    "prop-types": "^15.5.4",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "react-hot-loader": "^3.0.0-beta.7",
    "react-redux": "^5.0.4",
    "react-router": "^4.0.0",
    "react-router-dom": "^4.0.0",
    "react-router-redux": "^4.0.8",
    "redux": "^3.6.0",
    "redux-devtools-extension": "^2.13.0"
  }
}
var path = require('path');
var color = require('colors-cli');  //控制台颜色
var DateFormat = require('dateformat-util');  //生成构建时间
var webpack = require('webpack');
//webpack如何全局加载第三方插件可以使用webpack官方的ProvidePlugin
const AssetsPlugin = require('assets-webpack-plugin')  //在生成代码时生成一个 json 文件,其中包含了源文件和打包结果的对应关系
const WebWebpackPlugin = require('web-webpack-plugin')
const {
	WebPlugin,
	AutoWebPlugin
} = WebWebpackPlugin; //加载html模板

var ExtractTextPlugin = require('extract-text-webpack-plugin'); //引入css 单独打包插件
var OpenBrowserPlugin = require('open-browser-webpack-plugin'); //webpack 启动后自动打开浏览器
var argv = require('yargs').argv; //可以用来开发自己的命令行工具集合

const PORT=12306;    //测试环境配置自定义本地端口
const pro_sourceMap=false;   //控制生产环境sourceMap

//判断当前运行环境是开发模式还是生产模式
const nodeEnv = process.env.NODE_ENV || 'development';  //默认是测试环境
const isPro = nodeEnv === 'production';

console.log(color.red("当前运行环境:" + (isPro ? 'production' : 'development')+"    构建时间:"+(DateFormat.format(new Date()))));

var plugins = [
	new ExtractTextPlugin({ //设置生成css 的路径和文件名,会自动将对应entry入口js文件中引入的CSS抽出成单独的文件
		filename: 'css/[name].[hash:7].css'
	}),
	new webpack.optimize.CommonsChunkPlugin({
		name: 'vendor',
		minChunks: function(module) {
			// 该配置假定你引入的 vendor 存在于 node_modules 目录中
			return module.context && module.context.indexOf('node_modules') !== -1;
		}
	}),
	new webpack.DefinePlugin({
		// 定义全局变量
		'process.env': {
			'NODE_ENV': JSON.stringify(nodeEnv)
		}
	}),
	new webpack.ProvidePlugin({   //将jquery暴露给所有模块,其它模块不用再显式require('jquery')了;只要模块的代码中出现了$,webpack就会自动将jQuery注入。
           // $: 'jquery' 
    }),
	new WebPlugin({  //加载模板,插入css和js
		filename: 'index.html',
		requires: ['vendor','app'], //要加载的js文件
		template: './index.html'
	}),
	new webpack.BannerPlugin("appver:"+DateFormat.format(new Date())) //作用是给输出文件最顶部添加最后一次构建时间appver
]
var app = ['./index']
if(isPro) { //生产环境
	plugins.push(
		new webpack.optimize.UglifyJsPlugin({
			sourceMap: pro_sourceMap,     
			beautify: false,
			comments: false,
			compress: {
		        warnings: false,
		        drop_console: true,
		        collapse_vars: true,
		        reduce_vars: true
		    }
		}),
		new AssetsPlugin()  
	) 
} else { //测试环境
	app.unshift('react-hot-loader/patch', 'webpack-dev-server/client?http://localhost:'+PORT, 'webpack/hot/only-dev-server')
	plugins.push(
		new webpack.HotModuleReplacementPlugin(),
		new webpack.NamedModulesPlugin(),
		new webpack.NoEmitOnErrorsPlugin(),
		new OpenBrowserPlugin({
			url: 'http://localhost:'+PORT
		}) //自动打开浏览器
	)
}

module.exports = {
	/*
	  基础目录,绝对路径,用于从配置中解析入口起点(entry point)和加载器(loader)
	*/
	context: path.resolve(__dirname, 'src'),
	devtool: isPro ? 'source-map' : 'cheap-module-source-map',   
	entry: {
		app: app
	},
	output: {
		filename: 'js/[name].[hash:7].js',
		path: path.resolve(__dirname, 'dist'),
		publicPath: '/'
	},
	// BASE_URL是全局的api接口访问地址
	plugins,
	// alias是配置全局的路径入口名称,只要涉及到下面配置的文件路径,可以直接用定义的单个字母表示整个路径
	resolve: {
		extensions: ['.js', '.jsx', '.less', '.scss', '.css'],   // webpack2 不再需要一个空的字符串
		modules: [
			path.resolve(__dirname, 'node_modules'),
			path.join(__dirname, './src')
		]
	},


	module: {
		rules: [{
				test: /\.(js|jsx)$/,
				exclude: /(node_modules|bower_components)/,
				use: {
					loader: 'babel-loader?cacheDirectory=true'
				}
			},  {
	            test: /\.(less|css)$/,
	            use: ExtractTextPlugin.extract({   //开启css压缩
	                use: [{loader:"css-loader",options:{minimize: true}}, "less-loader", "postcss-loader"]
	            })
            }, {
				test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
				use: [
					'url-loader?limit=10240&name=img/[name].[hash:7].[ext]'
				]
			}, {
				test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
				use: [ //设置字体生成文件夹
					'url-loader?limit=10240&name=font/[name].[hash:7].[ext]'
				]
			}
		]
	},
	devServer: {
		hot: true,
		host: '127.0.0.1',
		contentBase: path.resolve(__dirname, 'dist'),
		publicPath: '/',
		port: PORT
	}
};

简历样式

想知道简历这么酷炫 有现成的组件么。。

读取jsx文件报错

项目有个依赖 hermes-treeselect,这个依赖的index文件格式是jsx,引入依赖后会报错

ERROR in ./~/hermes-treeselect/src/async/index.jsx
Module parse failed: /Users/jianheng.he/workspace/static/marketing-form-builder/node_modules/hermes-treeselect/src/async/index.jsx Unexpected token (22:22)
You may need an appropriate loader to handle this file type.
| 
| class Tree extends Component {
|   static defaultProps = {
|     onExpand: noop,
|     onCheck: noop,
 @ ./~/hermes-treeselect/asynctree.jsx 1:0-46
 @ ./src/components/FormBuilder/comps/SelectCustomers.js
 @ ./src/components/FormBuilder/elementMap.js
 @ ./src/components/FormBuilder/Stage.js
 @ ./src/containers/FormBuilder/FormBuilderContainer.js
 @ ./src/appContainer.js
 @ ./src/index.js
 @ multi babel-polyfill ./src/index webpack-hot-middleware/client?path=http://localhost:3011/__webpack_hmr&reload=true&noInfo=false&quiet=false

没有找到server.js

启动报错:
module not found: Error: Can't resolve 'loglevel' in '/Users/ykw/react/react-redux-webpack2/node_modules/webpack-dev-server/client

tests fail

Hi, Thanks for this (and English translations :)

I tried both Mac and Windows:

$ jest
FAIL test/test.js
● async/await 函数测试

TypeError: (0 , _fetchData.getData) is not a function
  
  at _callee$ (test/test.js:16:55)
  at tryCatch (node_modules/regenerator-runtime/runtime.js:65:40)
  at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:303:22)
  at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:117:21)
  at step (test/test.js:8:333)
  at test/test.js:8:563
  at Object.<anonymous> (test/test.js:8:244)
  at process._tickCallback (internal/process/next_tick.js:109:7)

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.