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

feat: add assets mode for asset path generate #1852

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Conversation

shulandmimi
Copy link
Member

Description:

add new filed for assets config

defineConfig({
	compilation: {
		assets: {
			// import path from "./logo.png";
			// "browser", "{output.publicPath}/{after build path}"
			// "node", fileURLToPath(new URL("${after build path}", import.meta.url))
			mode: "browser"
		}
	}
});

when static resources are used in SSR

defineConfig({
	compilation: {
		output: {
			publicPath: "/"
		},
		assets: {
			mode: "browser"
		}
	}
});

BREAKING CHANGE:

Related issue (if exists):

fix #1837

@shulandmimi shulandmimi requested a review from wre232114 October 22, 2024 08:36
Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: c72de37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farmfe/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codspeed-hq bot commented Oct 22, 2024

CodSpeed Performance Report

Merging #1852 will create unknown performance changes

Comparing feat/assetMode (c72de37) with main (a785d6f)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.

@wre232114 wre232114 enabled auto-merge (squash) October 22, 2024 11:10
@wre232114 wre232114 merged commit 3651244 into main Oct 22, 2024
36 checks passed
@wre232114 wre232114 deleted the feat/assetMode branch October 22, 2024 14:53
@github-actions github-actions bot mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report]: image url error when using SSR mode
2 participants