Giter VIP home page Giter VIP logo

Comments (5)

yiludege avatar yiludege commented on July 24, 2024

举个例子:
cssLoader: (code, url) => {
return code.replace('./images/my-image.png', 'https://localhost:8000//images/my-image.png')
}
可以用正则匹配去做到更加通用

from wujie.

ldd-winter avatar ldd-winter commented on July 24, 2024

谢谢

from wujie.

TheShining avatar TheShining commented on July 24, 2024

我 "wujie-vue3": "^1.0.16" 还是有这个问题,
子应用代码:background-image: url('@/assets/images/user.jpg');
或者 background-image: url('../../../../assets/images/user1.jpg'); 都不行
子应用baseUrl: http://localhost:5178
最终会链接到主应用端口 5173
http://localhost:5173/src/assets/images/user.jpg

from wujie.

TheShining avatar TheShining commented on July 24, 2024

举个例子: cssLoader: (code, url) => { return code.replace('./images/my-image.png', 'https://localhost:8000//images/my-image.png') } 可以用正则匹配去做到更加通用

这个我也试了,但是code里面没有我的代码,我的css代码写在vue3单页面文件<style lang="scss" scoped>标签里面

from wujie.

ChanHaiWei avatar ChanHaiWei commented on July 24, 2024

我 "wujie-vue3": "^1.0.16" 还是有这个问题, 子应用代码:background-image: url('@/assets/images/user.jpg'); 或者 background-image: url('../../../../assets/images/user1.jpg'); 都不行 子应用baseUrl: http://localhost:5178 最终会链接到主应用端口 5173 http://localhost:5173/src/assets/images/user.jpg

我使用的react,background-image是写在Style.module.css文件里的,通过cssLoader也是找不到

from wujie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.