Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

vite引入第三方依赖,该依赖中又引入了相对目录下的css,这个css无法加载

我引入了leaflet-side-by-side这个文件,在vite.config.js中设置如下:

module.exports = {
  optimizeDeps: {
    include: ["leaflet", "leaflet-side-by-side"]
  }
}

引入错误

layout.css, range.css是在leaflet-side-by-side中被引入的

image

我应该怎样配置vite.config.js呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...