Skip to content

Instantly share code, notes, and snippets.

@selbekk
Last active August 1, 2018 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selbekk/e6f90eb2c818408208ffd7e179642b38 to your computer and use it in GitHub Desktop.
Save selbekk/e6f90eb2c818408208ffd7e179642b38 to your computer and use it in GitHub Desktop.
webpack and less - webpack.config.js
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