webpack.js.org icon indicating copy to clipboard operation
webpack.js.org copied to clipboard

Document webpack change: Feat webpack ignore

Open webpack-bot opened this issue 1 year ago • 0 comments

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

See pull request: https://github.com/webpack/webpack/pull/18867


What kind of change does this PR introduce?

feature

We do not support (due performance reasons), but css-loader - yes:

/* webpackIgnore: true */
@import url(./basic.css);

.class {
	color: red;
	/* webpackIgnore: true */
	background: url("./url/img.png");
}

Also https://webpack.js.org/plugins/ignore-plugin/ works fine with CSS

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

We support:

@import /* webpackIgnore: false */ url(./basic.css);

.class {
	color: red;
	background: /* webpackIgnore: true */ url("./url/img.png");
}


.class {
	background-image: image-set(
		/*webpackIgnore:  true*/
		url(./url/img1x.png) 1x,
		url(./url/img2x.png) 2x,
		url(./url/img3x.png) 3x
	);
}

webpack-bot avatar Oct 17 '24 15:10 webpack-bot