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

Document webpack change: refactor: migrate on acorn-import-attributes #7280

Open
webpack-bot opened this issue Jun 10, 2024 · 0 comments
Open
Assignees

Comments

@webpack-bot
Copy link

A pull request by @alexander-akait was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#18251


What kind of change does this PR introduce?

xtuc/acorn-import-attributes#31

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

Added with ruleset rule, like assert, i.e.:

/** @type {import("../../../../").Configuration} */
module.exports = {
	module: {
		rules: [
			{
                                // will handle `pkg-1.json`
				assert: { type: "json" },
				loader: require.resolve("./loader-assert.js")
			},
			{
			        // will handle `pkg-2.json`
				with: { type: "json" },
				loader: require.resolve("./loader-with.js")
			}
		]
	}
};

```js
import one from "./pkg-1.json" assert { type: "json" };
import two from "./pkg-2.json" with { type: "json" };
@snitin315 snitin315 self-assigned this Jun 11, 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

No branches or pull requests

2 participants