brickspert / react-family Goto Github PK
View Code? Open in Web Editor NEWreact全家桶框架
react全家桶框架
RT
patch.dev.js:141 React Hot Loader: this component is not accepted by Hot Loader. Please check is it extracted as a top level class, a function or a variable. Click below to reveal the source location: ƒ (props) { return _react2.default.createElement( _Bundle2.default, { load: component }, function (Component) { return Component ? _react2.de…
页面切换的时候会出现这个警告 不太清楚这个警告是由于什么原因导致的
Warning: forceUpdate(...): Can only update a mounted or mounting component. This usually means you called forceUpdate() on an unmounted component. This is a no-op. Please check the code for the UserInfo component.
Webpack is so complex
在安装 babel-preset-es2015
时,注意到现在推荐使用 babel-preset-env
。
npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
于是就了解了一下 babel-preset-env
,它可以根据运行环境智能的转换代码,而不是一股脑的转换成 ES5
,更能充分的发挥新版本的特性。是否考虑使用 babel-preset-env
替换大堆预设?
\react-family\src\redux>node build
报错: Unexpected token import
[email protected] start /Users/wuwentao/Desktop/demo/react-family
webpack-dev-server --config webpack.dev.config.js --color --progress --hot
10% building modules 2/2 modules 0 activeevents.js:167 r throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8080
at Server.setupListenHandle [as _listen2] (net.js:1336:14)
at listenInCluster (net.js:1384:12)
at doListen (net.js:1510:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
Emitted 'error' event at:
at emitErrorNT (net.js:1363:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: webpack-dev-server --config webpack.dev.config.js --color --progress --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wuwentao/.npm/_logs/2018-12-24T11_04_33_602Z-debug.log
$ webpack --config webpack.dev.config.js
Hash: 908c34d03b5wefwefw
Version: webpack 3.12.0
Time: 38ms
Asset Size Chunks Chunk Names
bundle.js 2.72 kB 0 [emitted] main
[0] ./src/index.js 248 bytes {0} [built] [failed] [1 error]
ERROR in ./src/index.js
Module parse failed: Unexpected token (4:16)
You may need an appropriate loader to handle this file type.
| import ReactDom from 'react-dom';
|
| ReactDom.render(
博主,我想请教一下这个工程的部署方式,我直接点击index.html打开浏览器一片空白。
请教您一个问题,就是 react-router 4.0 + 可以实现嵌套路由吗,网上的资料确实有限,目前还没发现一个标准答案,嘿嘿。
用最新版的webpack 和webpack-dev-server,在webpack-dev-server服务器运行时会报错。后来看了package.json改了版本。。在安装的时候指定版本会不会好点.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.