fix: css import bug

This commit is contained in:
suxiaoxin 2018-02-22 15:18:42 +08:00
parent 5744dcca54
commit 57fcbf0eb3
20 changed files with 21 additions and 43 deletions

View File

@ -36,8 +36,8 @@
}
.card-login {
margin-top: 1.6rem !important;
margin-bottom: 1.6rem !important;
margin-top: 1.6rem;
margin-bottom: 1.6rem;
border-radius: .04rem;
position: relative;
.login-logo {

View File

@ -1,31 +1,20 @@
import './styles/common.scss';
import './styles/theme.less'
import './plugin'
import React from 'react'
import ReactDOM from 'react-dom'
import App from './Application'
import { Provider } from 'react-redux'
import createStore from './reducer/create';
import './styles/common.scss';
import './styles/theme.less'
const store = createStore();
//if (process.env.NODE_ENV === 'production') {
ReactDOM.render(
<Provider store={store}>
<div>
<App />
</div>
</Provider>,
document.getElementById('yapi')
)
// } else {
// const DevTools = require('./containers/DevTools/DevTools.js')
// ReactDOM.render(
// <Provider store={store}>
// <div>
// <App />
// <DevTools />
// </div>
// </Provider>,
// document.getElementById('yapi')
// )
// }
ReactDOM.render(
<Provider store={store}>
<div>
<App />
</div>
</Provider>,
document.getElementById('yapi')
)

View File

@ -1 +1 @@
window.WEBPACK_ASSETS = {"index.js":{"js":"index@64d0c88464401724c14f.js","css":"index@64d0c88464401724c14f.css"},"lib":{"js":"lib@86b5f0e3e3bacbcf42a9.js"},"lib2":{"js":"lib2@2069f50880083ab20bf6.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
window.WEBPACK_ASSETS = {"index.js":{"js":"index@d486ce5c1fae1ad55298.js","css":"index@d486ce5c1fae1ad55298.css"},"lib":{"js":"lib@2d286746faa53b32ecd9.js"},"lib2":{"js":"lib2@b2cdd6868a495cfa2892.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -71,10 +71,10 @@ module.exports = {
exclude: /node_modules\/(?!yapi-plugin)/
}
}],
// devtool: 'cheap-source-map',
devtool: 'cheap-source-map',
config: function (ykit) {
return {
exports: [
exports: [
'./index.js'
],
commonsChunk: {
@ -105,18 +105,9 @@ module.exports = {
'axios',
'moment'
]
},
minChunks: (module, count) => {
if (/\.css/.test(module.resource)) {
return true
}
else {
return count >= 2;
}
}
},
modifyWebpackConfig: function (baseConfig) {
var ENV_PARAMS = {};
switch (this.env) {
case 'local':
@ -151,7 +142,6 @@ module.exports = {
baseConfig.output.prd.filename = '[name]@[chunkhash][ext]'
baseConfig.module.noParse = /node_modules\/jsondiffpatch\/public\/build\/.*js/,
baseConfig.module.loaders.push({
test: /\.less$/,
loader: ykit.ExtractTextPlugin.extract(
@ -164,7 +154,6 @@ module.exports = {
baseConfig.module.loaders.push({
test: /\.(sass|scss)$/,
loader: ykit.ExtractTextPlugin.extract(
require.resolve('style-loader'),
require.resolve('css-loader')
+ '?sourceMap!'
+ require.resolve('fast-sass-loader-china') + '?sourceMap'