You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove experimental for modularizeImports from docs and example (#44311)
When `modularizeImports` was moved out of experiimental [on this PR](#44240), `docs` and `examples` were not updated.
- Update `modularize-imports` example by removing `experimental` from `next.config.js`, as it's currently failing when deployed
- For docs: https://nextjs.org/docs/advanced-features/compiler#modularize-imports
- Move `Modularize Imports` section outside of `Experimental Features` section
- Remove `experimental` from code snippets
- Added to version history, just like when SWC Minifier became stable.
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
|`v12.2.0`|[SWC Plugins](#swc-plugins-Experimental) experimental support added. |
@@ -264,30 +265,6 @@ module.exports = {
264
265
}
265
266
```
266
267
267
-
## Experimental Features
268
-
269
-
### Minifier debug options
270
-
271
-
While the minifier is experimental, we are making the following options available for debugging purposes. They will not be available once the minifier is made stable.
272
-
273
-
```js
274
-
// next.config.js
275
-
276
-
module.exports= {
277
-
experimental: {
278
-
swcMinifyDebugOptions: {
279
-
compress: {
280
-
defaults:true,
281
-
side_effects:false,
282
-
},
283
-
},
284
-
},
285
-
}
286
-
```
287
-
288
-
If your app works with the options above, it means `side_effects` is the problematic option.
289
-
See [the SWC documentation](https://swc.rs/docs/configuration/minification#jscminifycompress) for detailed options.
290
-
291
268
### Modularize Imports
292
269
293
270
Allows to modularize imports, similar to [babel-plugin-transform-imports](https://www.npmjs.com/package/babel-plugin-transform-imports).
@@ -312,14 +289,12 @@ Config for the above transform:
@@ -371,6 +344,30 @@ This transform uses [handlebars](https://docs.rs/handlebars) to template the rep
371
344
2.`member`: Has type `string`. The name of the member import.
372
345
3.`lowerCase`, `upperCase`, `camelCase`, `kebabCase`: Helper functions to convert a string to lower, upper, camel or kebab cases.
373
346
347
+
## Experimental Features
348
+
349
+
### Minifier debug options
350
+
351
+
While the minifier is experimental, we are making the following options available for debugging purposes. They will not be available once the minifier is made stable.
352
+
353
+
```js
354
+
// next.config.js
355
+
356
+
module.exports= {
357
+
experimental: {
358
+
swcMinifyDebugOptions: {
359
+
compress: {
360
+
defaults:true,
361
+
side_effects:false,
362
+
},
363
+
},
364
+
},
365
+
}
366
+
```
367
+
368
+
If your app works with the options above, it means `side_effects` is the problematic option.
369
+
See [the SWC documentation](https://swc.rs/docs/configuration/minification#jscminifycompress) for detailed options.
370
+
374
371
### SWC Trace profiling
375
372
376
373
You can generate SWC's internal transform traces as chromium's [trace event format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview?mode=html#%21=).
0 commit comments