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
Upate swc to allow line comments in css #29943
Conversation
@@ -173,6 +175,7 @@ impl Namespacer { | |||
&args, | |||
ParserConfig { | |||
parse_values: false, | |||
allow_wrong_line_comments: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not really "wrong", just not standardized in the spec. It works it some browsers.
I would call this allow_nonstandard_line_comments
or allow_unofficial_line_comments
🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, nonstandard
seems better.
Thasnk!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stats from current PRDefault Build (Decrease detected ✓)General Overall decrease ✓
Page Load Tests Overall increase ✓
Client Bundles (main, webpack, commons)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Default Build with SWC (Decrease detected ✓)General Overall decrease ✓
Page Load Tests Overall decrease
|
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.774 | 2.862 | |
/ avg req/sec | 901.38 | 873.55 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.29 | 1.284 | -0.01 |
/error-in-render avg req/sec | 1937.69 | 1946.41 | +8.72 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
675-HASH.js gzip | 13.8 kB | 13.8 kB | ✓ |
770.HASH.js gzip | 178 B | 178 B | ✓ |
framework-HASH.js gzip | 50.8 kB | 50.8 kB | ✓ |
main-HASH.js gzip | 35.1 kB | 35.1 kB | |
webpack-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
Overall change | 101 kB | 101 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
polyfills-a4..dd70.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error-HASH.js gzip | 180 B | 180 B | ✓ |
amp-HASH.js gzip | 315 B | 315 B | ✓ |
css-HASH.js gzip | 331 B | 331 B | ✓ |
dynamic-HASH.js gzip | 2.79 kB | 2.79 kB | ✓ |
head-HASH.js gzip | 355 B | 355 B | ✓ |
hooks-HASH.js gzip | 637 B | 637 B | ✓ |
image-HASH.js gzip | 555 B | 555 B | ✓ |
index-HASH.js gzip | 261 B | 261 B | ✓ |
link-HASH.js gzip | 2.22 kB | 2.22 kB | ✓ |
routerDirect..HASH.js gzip | 326 B | 326 B | ✓ |
script-HASH.js gzip | 393 B | 393 B | ✓ |
withRouter-HASH.js gzip | 322 B | 322 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 10.1 kB | 10.1 kB | ✓ |
Client Build Manifests Overall decrease ✓
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
_buildManifest.js gzip | 511 B | 510 B | -1 B |
Overall change | 511 B | 510 B | -1 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | kdy1/next.js swc | Change | |
---|---|---|---|
index.html gzip | 538 B | 538 B | ✓ |
link.html gzip | 552 B | 551 B | -1 B |
withRouter.html gzip | 533 B | 532 B | -1 B |
Overall change | 1.62 kB | 1.62 kB | -2 B |
Diffs
Diff for _buildManifest.js
@@ -17,7 +17,7 @@ self.__BUILD_MANIFEST = {
"static\u002Fchunks\u002Fpages\u002Fhooks-7fa8f6299881aeef4d92.js"
],
"/image": [
- "static\u002Fchunks\u002F675-ffd8e0a2b0069cbe0b83.js",
+ "static\u002Fchunks\u002F675-9c6edfe56b83ffcb92d8.js",
"static\u002Fchunks\u002Fpages\u002Fimage-24dfc0766459a85ca885.js"
],
"/link": ["static\u002Fchunks\u002Fpages\u002Flink-d5bdd3af9bbbd881abda.js"],
Diff for 675-HASH.js
@@ -2371,7 +2371,6 @@
_nonIterableSpread()
);
}
- var _Math;
__webpack_unused_export__ = {
value: true
};
@@ -2515,6 +2514,7 @@
percentSizes.push(parseInt(match[2]));
}
if (percentSizes.length) {
+ var _Math;
var smallestRatio =
(_Math = Math).min.apply(
_Math,
Diff for main-HASH.js
@@ -2306,14 +2306,13 @@
_nonIterableSpread()
);
}
- var _router, __singletonRouter, _scopedRouter;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Router", {
enumerable: true,
get: function get() {
- return _router1.default;
+ return _router.default;
}
});
Object.defineProperty(exports, "withRouter", {
@@ -2327,7 +2326,7 @@
exports.makePublicRouterInstance = makePublicRouterInstance;
exports["default"] = void 0;
var _react = _interopRequireDefault(__webpack_require__(7294));
- var _router1 = _interopRequireDefault(__webpack_require__(6542));
+ var _router = _interopRequireDefault(__webpack_require__(6542));
var _routerContext = __webpack_require__(9237);
var _isError = _interopRequireDefault(__webpack_require__(676));
var _withRouter = _interopRequireDefault(__webpack_require__(8738));
@@ -2384,7 +2383,7 @@
// Events is a static property on the router, the router doesn't have to be initialized to use it
Object.defineProperty(singletonRouter, "events", {
get: function() {
- return _router1.default.events;
+ return _router.default.events;
}
});
urlPropertyFields.forEach(function(field) {
@@ -2408,6 +2407,7 @@
) {
args[_key] = arguments[_key];
}
+ var _router;
var router = getRouter();
return (_router = router)[field].apply(
_router,
@@ -2417,7 +2417,7 @@
});
routerEvents.forEach(function(event) {
singletonRouter.ready(function() {
- _router1.default.events.on(event, function() {
+ _router.default.events.on(event, function() {
for (
var _len = arguments.length, args = new Array(_len), _key = 0;
_key < _len;
@@ -2431,6 +2431,7 @@
var _singletonRouter = singletonRouter;
if (_singletonRouter[eventField]) {
try {
+ var __singletonRouter;
(__singletonRouter = _singletonRouter)[eventField].apply(
__singletonRouter,
_toConsumableArray(args)
@@ -2472,7 +2473,7 @@
args[_key] = arguments[_key];
}
singletonRouter.router = _construct(
- _router1.default,
+ _router.default,
_toConsumableArray(args)
);
singletonRouter.readyCallbacks.forEach(function(cb) {
@@ -2518,7 +2519,7 @@
}
}
// Events is a static property on the router, the router doesn't have to be initialized to use it
- instance.events = _router1.default.events;
+ instance.events = _router.default.events;
coreMethodFields.forEach(function(field) {
instance[field] = function() {
for (
@@ -2528,6 +2529,7 @@
) {
args[_key] = arguments[_key];
}
+ var _scopedRouter;
return (_scopedRouter = scopedRouter)[field].apply(
_scopedRouter,
_toConsumableArray(args)
Diff for index.html
@@ -19,7 +19,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/main-1c79c5ac6d5b9e939bf5.js"
+ src="/_next/static/chunks/main-4d9be84fbb3e49256a54.js"
defer=""
></script>
<script
Diff for link.html
@@ -19,7 +19,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/main-1c79c5ac6d5b9e939bf5.js"
+ src="/_next/static/chunks/main-4d9be84fbb3e49256a54.js"
defer=""
></script>
<script
Diff for withRouter.html
@@ -19,7 +19,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/main-1c79c5ac6d5b9e939bf5.js"
+ src="/_next/static/chunks/main-4d9be84fbb3e49256a54.js"
defer=""
></script>
<script
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples