nuxt: Assets does not compiled at nuxt-edge:latest
Version
Reproduction link
.
Steps to reproduce
I’m using nuxt-edge version “latest”
since I’m re-installed packages (node_modules), this bug showed up.
so I’m guessing latest build has this bug
What is expected ?
~assets/icon.svg (in style section)
should be turn into
data:image/svg+xml;base64 ...)
What is actually happening?
assets doesn’t compiled. for example) background-image: url(/assets/icon.svg)
Additional comments?
Assets compiled with 2.0.0-25468832.6578bd7
not compiled with latest build which 2.0.0-25569931.85a8af5
I’m using nuxt starter template
<div align="right">This bug report is available on Nuxt community (#c7565)</div>About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (7 by maintainers)
Please use
~/assetsinurl()resources, because~is a special indicator in css-loader,~assetswill be resolved in modules. CSS Loader Doc: https://github.com/webpack-contrib/css-loader#url Pull Request fixed aliases starting with/: https://github.com/webpack-contrib/css-loader/pull/597 Nuxt Related Issue: https://github.com/nuxt/nuxt.js/issues/1435 Webpack Comment on~: https://github.com/webpack/webpack/issues/2395#issuecomment-215755958 Lib CSS Loader is using for url loading: https://github.com/webpack/loader-utils#module-urls@manniL Thank you for your response 😃
Ah sorry I tried
~/assets/..in<style>not~assets/..I just tried
~assets/..in<style>and this works well. and~/assets/../~assets/..both works well in<template>I’m wondering why doesn’t work
~/assets/..with <style> section. is this a feature?Hey 👋
Have you tried
~/assets/..vs.~assets/.../?