Skip to content
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

Warn when using with postcss-loader #942

Closed
coolzjy opened this issue Aug 11, 2017 · 6 comments · Fixed by #1055
Closed

Warn when using with postcss-loader #942

coolzjy opened this issue Aug 11, 2017 · 6 comments · Fixed by #1055

Comments

@coolzjy
Copy link

coolzjy commented Aug 11, 2017

Version

12.2.0

Reproduction link

https://github.com/coolzjy/vue-loader-postcss

Steps to reproduce

  1. Init a project using vue-cli and webpack template
  2. Install postcss and postcss-loader
  3. Edit build/utils.js:
-    css: generateLoaders(),
+    css: generateLoaders('postcss'),
  1. npm run dev

What is expected?

Works fine

What is actually happening?

Got warn
image

@coolzjy
Copy link
Author

coolzjy commented Aug 11, 2017

have tried:

  1. set sourceMap: false in postcss-loader config
  2. set cssSourceMap: false in vue-loader config
    Still not resolved.

Related issues:
webpack-contrib/postcss-loader#253
webpack-contrib/postcss-loader#264

@applefreak
Copy link

Has this ever got solved?

@ghost
Copy link

ghost commented Oct 17, 2017

Hi,
I had the same issue with you.
my repo: https://github.com/StarXY/webpackDemo
version: 13.3.0
nodejs: 8.2
OS: win7

@ghost
Copy link

ghost commented Oct 17, 2017

maybe a temporary solution.
from

<style lang="postcss"></style>

to

<style ></style>

related: #937

@yyx990803
Copy link
Member

There's no need to use postcss-loader with vue-loader. Just use vue-loader' own postcss option.

blake-newman added a commit to blake-newman/vue-loader that referenced this issue Nov 12, 2017
If no postcss loader is provided in vue loader options then default to
vue-loader handling

This allows you to use vue internal postcss/css handling with known
postcss extensions

fixes: vuejs#942
fixes: vuejs#800
fixes: vuejs#654
@blake-newman
Copy link
Member

@yyx990803 If not using lang="postcss" ect most IDE layers do not read the contents as postcss but plain css. Thus syntax highlighting is broken. This may be why people are configuring there own loaders which causes warning. I have created a Fix with #1055

yyx990803 pushed a commit that referenced this issue Dec 15, 2017
If no postcss loader is provided in vue loader options then default to
vue-loader handling

This allows you to use vue internal postcss/css handling with known
postcss extensions

fixes: #942
fixes: #800
fixes: #654
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

Successfully merging a pull request may close this issue.

4 participants