Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use websocket to package .less files

Shulou Source: shulou.com Published: 2022-06-03 14:55:55 11月15日 Update

This article is about how to package.less files using websocket. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Installation:

npm install style-loader css-loader less-loader less

Configuration:

const path = require('path');module.exports = {entry: './ src/index.js',output: {filename: 'bundle.js',path: path.resolve(__dirname)},module: {rules: [ { test: /\. (less|css)$/, use: [ 'style-loader', 'css-loader', 'less-loader' ] }]}};

(Note: Order cannot be reversed)

Use:

import less from './ static/less/test.less';console.log(less) Thank you for reading! About "how to use websocket package.less file" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Files content more articles good practical articles look knowledge order reference help related configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple MySQL vpn Docker