为什么vue以scss样式删除base64?

时间:2019-09-28 14:30:02

标签: css vue.js webpack vue-cli

为什么在css构建期间vue / cli省略了我的base64映像?

在我的style.scss内部,只有这一行:

:root {
  --image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNzAgMTgwIiB2ZXJzaW9uPSIxLjEiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHN0eWxlPSJkaXNwbGF5OiBub25lOyI+PHJlY3QgY2xpcC1wYXRoPSJ1cmwoI3QzeGFrZG5hbzlyKSIgeD0iMCIgeT0iMCIgd2lkdGg9IjI3MCIgaGVpZ2h0PSIxODAiIHN0eWxlPSJmaWxsOiB1cmwoJnF1b3Q7I2s5Mm44NzZ5byZxdW90Oyk7Ii8+PGRlZnM+PGNsaXBQYXRoIGlkPSJ0M3hha2RuYW85ciI+PHJlY3QgeD0iMCIgeT0iMCIgcng9IjAiIHJ5PSIwIiB3aWR0aD0iMjY1IiBoZWlnaHQ9IjE0MCIvPjxyZWN0IHg9IjAiIHk9IjE0NSIgcng9IjMiIHJ5PSIzIiB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1Ii8+PHJlY3QgeD0iMCIgeT0iMTY1IiByeD0iMyIgcnk9IjMiIHdpZHRoPSIxNTAiIGhlaWdodD0iMTUiLz48cmVjdCB4PSIyMjAiIHk9IjE0NSIgcng9IjMiIHJ5PSIzIiB3aWR0aD0iNDUiIGhlaWdodD0iMTUiLz48cmVjdCB4PSIyMjAiIHk9IjE2NSIgcng9IjMiIHJ5PSIzIiB3aWR0aD0iNDUiIGhlaWdodD0iMTUiLz48L2NsaXBQYXRoPjxsaW5lYXJHcmFkaWVudCBpZD0iazkybjg3NnlvIj48c3RvcCBvZmZzZXQ9Ii0xLjc3NTAxIiBzdG9wLWNvbG9yPSIjZTllOWU5IiBzdG9wLW9wYWNpdHk9IjEiPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9mZnNldCIgdmFsdWVzPSItMjsgMSIgZHVyPSIycyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L3N0b3A+PHN0b3Agb2Zmc2V0PSItMS4yNzUwMSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIgc3RvcC1vcGFjaXR5PSIxIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvZmZzZXQiIHZhbHVlcz0iLTEuNTsgMS41IiBkdXI9IjJzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjwvc3RvcD48c3RvcCBvZmZzZXQ9Ii0wLjc3NTAwOSIgc3RvcC1jb2xvcj0iI2U5ZTllOSIgc3RvcC1vcGFjaXR5PSIxIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvZmZzZXQiIHZhbHVlcz0iLTE7IDIiIGR1cj0iMnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==');
}

但是在使用npm run build并在css捆绑包中构建项目后,我没有得到base64映像。相反,我有:

:root{--image:url("data:image/svg+xml;base64,")}

我该如何解决?

0 个答案:

没有答案