mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
添加client PATH路径
This commit is contained in:
parent
b1043111f0
commit
d6354ee0c8
@ -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() {
|
||||
|
25677
dev/scripts/index.js
25677
dev/scripts/index.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -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*/
|
@ -1 +0,0 @@
|
||||
{"version":3,"file":"styles/index.css","sources":[],"mappings":";;;;;;;;;;;;;","sourceRoot":""}
|
@ -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>
|
||||
|
@ -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
|
@ -1,8 +0,0 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import App from './App'
|
||||
|
||||
ReactDOM.render(
|
||||
<App />,
|
||||
document.getElementById('yapi')
|
||||
)
|
@ -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>
|
||||
)
|
||||
}
|
@ -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
41
ykit.js
@ -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: []
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user