Skip to content

Instantly share code, notes, and snippets.

@murbanowicz
Created February 9, 2019 15:40
Show Gist options
  • Save murbanowicz/47dbdae0a1508a5a9fea88b2d92211eb to your computer and use it in GitHub Desktop.
Save murbanowicz/47dbdae0a1508a5a9fea88b2d92211eb to your computer and use it in GitHub Desktop.
Configuring Webpack 4 to work with Fomantic UI LESS
// right at the top of the file where you are declaring all other plugins
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
// ...
resolve: {
alias: {
"../../theme.config$": path.join(__dirname, "/semantic-ui/theme.config"),
"../semantic-ui/site": path.join(__dirname, "/semantic-ui/site")
}
},
module: {
rules: [
// other files' rules
// less
{
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: ["css-loader", "less-loader"]
}),
test: /\.less$/
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment