添加client PATH路径

This commit is contained in:
waliang.wang 2017-07-05 20:40:31 +08:00
parent b1043111f0
commit d6354ee0c8
11 changed files with 24 additions and 25762 deletions

View File

@ -1,8 +1,8 @@
import React, { Component } from 'react'
import Routes from './routes'
import './styles/cs.scss'
// import './styles/cs.scss'
// import './styles/cs.less'
console.log(55555)
console.log(444)
class App extends Component {
render() {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
body {
background-color: #f2f2f2;
}
.app{
position: absolute;
top: 50%;
left: 0;
width: 100%;
color: #444;
text-align: center;
margin: -70px 0 0;
}
/*# sourceMappingURL=index.css.map*/

View File

@ -1 +0,0 @@
{"version":3,"file":"styles/index.css","sources":[],"mappings":";;;;;;;;;;;;;","sourceRoot":""}

View File

@ -7,6 +7,6 @@
</head>
<body>
<div id="yapi"></div>
<script src="./dev/scripts/index.js"></script>
<script src="./dev/index.js"></script>
</body>
</html>

View File

@ -1,13 +0,0 @@
import React, { Component } from 'react'
import Routes from './routes'
// import '../..//styles/cs.scss'
// import './styles/cs.less'
console.log(555)
class App extends Component {
render() {
return <Routes />
}
}
export default App

View File

@ -1,8 +0,0 @@
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(
<App />,
document.getElementById('yapi')
)

View File

@ -1,11 +0,0 @@
import React from 'react'
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
import { Home } from '../../client/containers/index'
export default store => {
return (
<Router>
<Route path="/" component={ Home } />
</Router>
)
}

View File

@ -1,13 +0,0 @@
body {
background-color: #f2f2f2;
}
.app{
position: absolute;
top: 50%;
left: 0;
width: 100%;
color: #444;
text-align: center;
margin: -70px 0 0;
}

41
ykit.js
View File

@ -1,22 +1,23 @@
const path = require('path');
module.exports = {
plugins: ['react', 'es6', 'antd'],
devtool: 'cheap-source-map',
config: {
exports: [
'./scripts/index.js',
'./styles/index.css'
],
modifyWebpackConfig: function(baseConfig) {
// edit ykit's Webpack configs
baseConfig.watch = true;
console.log(baseConfig)
return baseConfig;
}
},
server: {
hot: true, // true/false默认 false效果相当于 ykit server --hot
overlay: true // true/false默认 false开启后可在当前打开的页面提示打包错误
},
hooks: {},
commands: []
plugins: ['react', 'es6', 'antd'],
devtool: 'cheap-source-map',
config: {
exports: [
'./index.js'
],
modifyWebpackConfig: function(baseConfig) {
console.log(path.resolve(__dirname, "client"))
baseConfig.context = path.resolve(__dirname, "client");
baseConfig.watch = true;
return baseConfig;
}
},
server: {
hot: true,
overlay: true
},
hooks: {},
commands: []
};