-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
不用dora怎么配开发环境 #58
Comments
自己搭的 报错
// .babelrc
{
"presets": ["react", "es2015","stage-1"],
"plugins": [
["transform-runtime", {
"polyfill": false,
"regenerator": true
}]
]
} var webpack = require('webpack');
module.exports = {
entry: __dirname + "/src/index.js",
output: {
path: __dirname + "/dist",
filename: "index.js"
},
devtool: 'eval-source-map',
devServer: {
contentBase: "./src",
colors: true,
historyApiFallback: true,
inline: true,
// hot: true
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{
test: /\.json$/,
loader: "json"
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: 'babel',
},
{
test: /\.(css|less)$/,
loader: 'style!css?modules'
}
]
}
} |
使用 create-react-app 开发 dva 应用安装 create-react-app,并创建应用。 $ npm install create-react-app -g
$ create-react-app myapp 进入项目目录。 $ cd myapp 安装 dva 。 $ npm install dva --save 编辑 import React from 'react';
import dva from 'dva';
import App from './App';
import './index.css';
const app = dva();
app.router(() => <App />);
app.start('#root'); 启动应用。 $ npm start 到这里,环境配置就完成了,然后你可以添加 model, router 等。 |
Closed
我也是同样的问题 namespace should be defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题。
The text was updated successfully, but these errors were encountered: