Comments (1)
Steps to reproduce
在 React18 中,已安装
@farmfe/js-plugin-less
插件,插件配置如下:import { defineConfig } from '@farmfe/core'; import farmJsPluginLess from '@farmfe/js-plugin-less' import * as path from 'node:path' export default defineConfig({ plugins: ['@farmfe/plugin-react', farmJsPluginLess()], compilation: { resolve: { alias: { '/@': path.join(process.cwd(), 'src') } } } });然后当我在
index.tsx
中使用下面命令引入 less 的时候,提示Can not resolve @/css/init.less from src/index.tsx.
,代码如下:import { Container, createRoot } from 'react-dom/client' import '@/css/init.less' import { Main } from './main'; const container = document.querySelector('#root') as Container; const root = createRoot(container); root.render(<Main />);麻烦指教下这块应该怎么处理
Reproduce link
No response
What is actually happening?
引入 less 文件后,提示
Can not resolve @/css/init.less from src/index.tsx
System Info
System: macOS 13.0.1 npm: 19.0.1
from farm.
Related Issues (20)
- [Bug Report]: Error on creating a project with PascalCase naming HOT 5
- [Bug Report]: 使用官方electron模板错误 HOT 1
- [Bug Report]: build tiny-vue error
- [Bug Report]: 多页面打包配置isolate=true时,页面无法正常显示 HOT 1
- [Bug Report]: "Cannot redefine property: init..." on versions after @farmfe/core 1.3.12 HOT 1
- [Bug Report]: Hmr has been updated multiple times
- [Bug Report]: relative import is not working in scss HOT 1
- [Bug Report]: `yarn create farm` failed HOT 1
- redefine `publicPath` logic
- [Refactor Node]: redefine `publicPath` logic HOT 1
- [Bug Report]: HMR with Tailwind does not work HOT 4
- [Bug Report]: relative import is not working in scss HOT 1
- [Bug Report]: @farmfe/js-plugin-dts cannot build TS projects with isolatedDeclarations HOT 1
- [Bug Report]: farm start error HOT 4
- [Feature Request]: in `viteplugin` and `farmplugin` `PostHooks` after server return with `configureServer` hook
- [Refactor]: refactor vite adapter
- [Feature Request]: New Docs
- [Feature Request]: Use farmup to build all farm packages
- [Bug Report]: 使用vite插件vite-plugin-compression不会压缩从public文件夹复制到dist文件夹的文件 HOT 2
- [Bug Report]: Lit is built in development mode when it should be in production mode. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from farm.