lacroixdesign / node-bourbon

A node-sass port of Bourbon.
http://lacroixdesign.github.io/node-bourbon
Other
148 stars 14 forks source link

help with bourbon and neat in webpack #39

Open cyrstem opened 6 years ago

cyrstem commented 6 years ago

hi i been using bourbon and neat with gulp but i been force to move to webpack, i have issues importing it and using it with a simple webpack conf file like this


module.exports ={
    mode:'none',
    entry :"./src/app.js",
    output: {
        path:__dirname+"/public",
        filename:"bundle.js"
        },
    devServer:{
        contentBase: __dirname+ "/public",
        port: 3000
        },
    module:{
        rules:[{loader:"babel-loader",
        test:/\.js/ 
           },
        {
            test:/\.s?css/, 
            use:[
            { loader: 'style-loader'}, 
            {loader: 'css-loader'},
            {loader:'sass-loader',options:{includePaths:[require('node-bourbon').includePaths,require('node-neat').includePaths]}}
        ]
            }

        ]//end of rules
    }
};

can some one show me how to load and use bourbon on here or what im i doing wrong thanks

simonpeters commented 6 years ago

Did you ever found out how to do this?

cyrstem commented 6 years ago

well i do it like this :


bourbon = require('node-bourbon').includePaths;

module.exports ={
    mode:'production',
    entry :"./src/app.js",
    output: {
        path:__dirname+"/public",
        filename:"bundle.js"
        },
    devServer:{
        contentBase: __dirname+ "/public",
        port: 3000
        },
    module:{
        rules:[
        {
        loader:"babel-loader",
        test:/\.js/ 
           },

        {
            test:/\.s?css/, 
            use:[
            { loader: 'style-loader'}, 
            {loader: 'css-loader'},
            {loader:'sass-loader',options:{includePaths:[require('node-bourbon').includePaths,require('node-neat').includePaths]}}
        ]
            }
        ]//end of rules
    }
};

it works but not sure if im doing "Right"