Created
February 9, 2019 15:40
-
-
Save murbanowicz/47dbdae0a1508a5a9fea88b2d92211eb to your computer and use it in GitHub Desktop.
Configuring Webpack 4 to work with Fomantic UI LESS
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
// 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