Skip to content

main.js import a css file throw a error(dependencies were not found) #642

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

Closed
cutpictureboy opened this issue Nov 14, 2017 · 1 comment
Closed

Comments

@cutpictureboy
Copy link

cutpictureboy commented Nov 14, 2017

import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.config.productionTip = false
Vue.use(ElementUI)

image

when i change the config in build/webpack.dev.config.js
old

const devWebpackConfig = merge(baseWebpackConfig, {
  module: {
    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
  },

new

const devWebpackConfig = merge(baseWebpackConfig, {
  module: {
    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: false })
  },

it work well

@cutpictureboy
Copy link
Author

today, i use vue init webpack initialize a project and not found this problem, but i use vue init webpackyesterday,this problems occur many times, so the problem may not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant