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

postcss-loader config information #118

Open
jonybuzz opened this issue Apr 6, 2020 · 2 comments
Open

postcss-loader config information #118

jonybuzz opened this issue Apr 6, 2020 · 2 comments

Comments

@jonybuzz
Copy link

jonybuzz commented Apr 6, 2020

I have a postcss.config.js file like this:

module.exports = {
    plugins: {
        'postcss-preset-env': { },
    },
};

What would be the best way to include post-css-variables? As a plugin of postcss or postcss-preset-env

Either way i´m having this error:

ERROR in ./node_modules/framework7/css/framework7.bundle.css (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src!./node_modules/framework7/css/framework7.bundle.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: Cannot read property 'indexOf' of undefined
    at path\to\project\node_modules\framework7\css\framework7.bundle.css:2813:3
    at path\to\project\node_modules\postcss-initial\index.js:20:22
    at path\to\project\node_modules\postcss\lib\container.js:190:18
    at path\to\project\node_modules\postcss\lib\container.js:135:18
    at Rule.each (path\to\project\node_modules\postcss\lib\container.js:101:16)
    at Rule.walk (path\to\project\node_modules\postcss\lib\container.js:131:17)
    at path\to\project\node_modules\postcss\lib\container.js:148:24
    at AtRule.each (path\to\project\node_modules\postcss\lib\container.js:101:16)
    at AtRule.walk (path\to\project\node_modules\postcss\lib\container.js:131:17)
    at path\to\project\node_modules\postcss\lib\container.js:148:24
    at Root.each (path\to\project\node_modules\postcss\lib\container.js:101:16)
    at Root.walk (path\to\project\node_modules\postcss\lib\container.js:131:17)
    at Root.walkDecls (path\to\project\node_modules\postcss\lib\container.js:188:19)
    at Object.plugin (path\to\project\node_modules\postcss-initial\index.js:19:9)
    at promise.then (path\to\project\node_modules\postcss-preset-env\index.js:443:97)
 @ .\node_modules\framework7\css\framework7.bundle.css 2:26-125 22:4-35:5 25:25-124
 @ .\src\js\app.js
 @ multi .\src\js\app.js

I want to discard that this is a postcss-loader or webpack problem

@jonybuzz
Copy link
Author

jonybuzz commented Apr 6, 2020

@MadLittleMods
Copy link
Owner

Is this a postcss-css-variables problem?

Looking at the usage on https://github.com/postcss/postcss-loader#usage, it seems like you can do this:

module.exports = {
    plugins: {
        'postcss-css-variables': { },
    },
};

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