Last active
August 1, 2018 09:42
-
-
Save selbekk/e6f90eb2c818408208ffd7e179642b38 to your computer and use it in GitHub Desktop.
webpack and less - webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const config = { | |
// First, let's define an entry point for webpack to start its crawling. | |
entry: './src/index.js', | |
// Second, we define where the files webpack produce, are placed | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js', | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.less$/, | |
use: [ | |
'style-loader', | |
'css-loader', | |
'less-loader' | |
], | |
}, | |
] | |
} | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment