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

requiring postcss-less-engine breaks webpack #6

Open
alisonailea opened this issue Sep 16, 2016 · 2 comments
Open

requiring postcss-less-engine breaks webpack #6

alisonailea opened this issue Sep 16, 2016 · 2 comments

Comments

@alisonailea
Copy link

Here's the code that breaks.

/* PostCSS Style Handling */
var map = require('postcss-map');
var autoprefixer = require('autoprefixer');
var nestedAncestors = require('postcss-nested-ancestors');
var nested = require('postcss-nested');
var lessEngine = require('postcss-less-engine');

...

module: {
    loaders: [
        {
            test: /\.less$/,
        loader: ExtractLESS.extract('style-loader', ['css-loader', 'less-loader']),
        }
    ]
},
postcss: function () {
    return [
        map(),
            nestedAncestors,
        nested,
        autoprefixer,
    ]
},

ERROR Unable to load webpack configuration file "webpack.config.dev.js": Cannot find module 'postcss'

BUT this code works...

/* PostCSS Style Handling */
var map = require('postcss-map');
var autoprefixer = require('autoprefixer');
var nestedAncestors = require('postcss-nested-ancestors');
var nested = require('postcss-nested');
// var lessEngine = require('postcss-less-engine');

...
@matthew-dean
Copy link
Member

I know hardly anything about webpack. Wouldn't this be a webpack issue?

@alisonailea
Copy link
Author

alisonailea commented Sep 19, 2016

but something about the postcss-less-engine breaks webpack simply by including it as a variable. I'm not even using it. I have webpack experience so I'll mess with it a bit and get back to you. I was just hoping there was a quick fix I was unaware of.

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

2 participants