Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression with string assetsInlineLimit in 4.4.0 #10153

Closed
1 task done
Cherry opened this issue Feb 18, 2024 · 0 comments · Fixed by #10154
Closed
1 task done

Regression with string assetsInlineLimit in 4.4.0 #10153

Cherry opened this issue Feb 18, 2024 · 0 comments · Fixed by #10154
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@Cherry
Copy link
Contributor

Cherry commented Feb 18, 2024

Astro Info

Astro                    v4.4.0
Node                     v20.11.1
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

With the following config, the basic starter site would build just fine in 4.3.7, but fails in 4.4.0.

export default defineConfig({
    vite: {
        build: {
            assetsInlineLimit: '0',
        }
    }
});

Using the basic template from npm create astro@latest:

  • npm run build with 4.3.7 - no issues
  • npm run build with 4.4.0 - errors with the following:
18:05:41 [ERROR] [vite] x Build failed in 658ms
[astro:rollup-plugin-inline-stylesheets] assetsInlineLimit is not a function
  Stack trace:
    at shouldInlineAsset (file:///E:/GitHub/astro-testing/verdant-visual/node_modules/astro/dist/core/build/plugins/util.js:44:18)
    at Array.forEach (<anonymous>)
    at file:///E:/GitHub/astro-testing/verdant-visual/node_modules/rollup/dist/es/shared/node-entry.js:19579:40

This seems to have been introduced with the bump to Vite 5.1 in #10120.

What's the expected result?

4.4.0 should build the site just fine, as it did in <= 4.3.7.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-nunp67

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 18, 2024
@matthewp matthewp added - P2: nice to have Not breaking anything but nice to have (priority) and removed needs triage Issue needs to be triaged labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants