Closed eduarddotgg closed 9 years ago
I don't understand how to setup it with web pack so variable could be imported from custom.js file. Could you please help me?
var vars = require('postcss-simple-vars'); var autoprefixer = require('autoprefixer-core'); var cssVariables = require('./custom.js'); module: { loaders: [ { test: /\.jade$/, loader: "jade" }, { test: /\.css$/, loader: "style!css!postcss" } ] }, postcss: function () { return [ cssimport({ onImport: function (files) { files.forEach(this.addDependency); }.bind(this) }), autoprefixer, vars(cssVariables) ]; }
it's working now! it was syntax error.
I don't understand how to setup it with web pack so variable could be imported from custom.js file. Could you please help me?