Parcel: How to convert less?

Created on 2 Jan 2018  路  4Comments  路  Source: parcel-bundler/parcel

Question

Most helpful comment

@echowant this is not even necessary in the new version, as it automatically installs less if it detects a less file

All 4 comments

Just point parcel to a less entrypoint and it'll build it?
A bit more context and filling in the issue template are very helpfull, now i'm just guessing what u mean

The most basic example would be adding your less file to the <head> of your html file and run parcel index.html. This should do the trick.

<!DOCTYPE html>
<html>
<head>
    <title>App</title>
    <!-- Simple as that :) -->
    <link rel="stylesheet" type="text/css" href="app.less">
</head>
<body>
    <img src="example.jpg">
    <script type="text/javascript" src="app.js"></script>
</body>
</html>

npm install less

@echowant this is not even necessary in the new version, as it automatically installs less if it detects a less file

Was this page helpful?
0 / 5 - 0 ratings