Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Disallow webpack from using cssnext as a loader #61

Closed
jasonkuhrt opened this issue Jan 27, 2015 · 14 comments · May be fixed by javifelices/postcss-cssnext#1, javifelices/postcss-cssnext#2 or javifelices/postcss-cssnext#3

Comments

@jasonkuhrt
Copy link
Contributor

Basically this should never happen webpack/webpack#725 (comment)!

@MoOx
Copy link
Owner

MoOx commented Jan 27, 2015

Note sure we can handle in cssnext, since webpack probably try module as a simple function (cssnext is such a function, that take a string as first param).
This should be handled in webpack probably...

@MoOx
Copy link
Owner

MoOx commented Jan 27, 2015

I am open to do something, but what?... I've no idea.

@jasonkuhrt
Copy link
Contributor Author

This should be handled in webpack probably...

@sokra agree?

@sokra
Copy link

sokra commented Jan 27, 2015

I can imaging no non-breaking webpack change which would fix this, but I schedule a breaking change for 2.0...

You can add this to cssnexts package.json:

  "loader": "this is not a loader"

@MoOx
Copy link
Owner

MoOx commented Jan 27, 2015

Maybe more something like

  "webpack": {
    "loader": "cssnext-loader" // then this warn user about using the appropriate loader
  }

@jasonkuhrt
Copy link
Contributor Author

Hurray for untyped languages. CC @stresslimit

@sokra
Copy link

sokra commented Jan 27, 2015

@MoOx This is supported, but it's only "loader": "cssnext-loader"

@MoOx
Copy link
Owner

MoOx commented Jan 27, 2015

adding a "loader" key in a package.json with the name of the real loader to use warn the user ? That would solve the issue then... What did I miss ?

@MoOx
Copy link
Owner

MoOx commented Feb 1, 2015

@sokra do you confirm that adding "loader": "cssnext-loader" in package.json in cssnext package will make webpack look for cssnext-loader and throw an error if this package is missing?

@sokra
Copy link

sokra commented Feb 3, 2015

Actually I think "loader": "cssnext-loader" is like "loader": "./cssnext-loader" and try to resolve to a file in the package. It works like the "main" field.

@MoOx
Copy link
Owner

MoOx commented Jun 30, 2015

Nobody has got the same issue, so I am closing.

@MoOx MoOx closed this as completed Jun 30, 2015
@MoOx
Copy link
Owner

MoOx commented Jul 15, 2015

Someone just get the same issue, I will make something to avoid this again.

@MoOx MoOx reopened this Jul 15, 2015
@bloodyowl
Copy link
Contributor

how about a npm_loader field, @sokra ?

@MoOx MoOx closed this as completed in 1db3127 Jul 15, 2015
@iam4x
Copy link

iam4x commented Jul 15, 2015

Great job @MoOx thank's 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants