Skip to content

Conversation

@EHandtkeBasis
Copy link
Member

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

vale

docs/docs/configuration/minifier-plugin.md|471 col 5| [Google.Headings] 'Security Warnings' should use sentence-style capitalization.
docs/docs/configuration/minifier-plugin.md|478 col 1| [Google.Colons] ': T' should be in lowercase.
docs/docs/configuration/minifier-plugin.md|480 col 1| [Google.Colons] ': U' should be in lowercase.
docs/docs/configuration/minifier-plugin.md|482 col 4| [Google.Headings] 'Frequently Asked Questions' should use sentence-style capitalization.
docs/docs/configuration/minifier-plugin.md|486 col 174| [Google.Contractions] Use 'can't' instead of 'cannot'.
docs/docs/configuration/minifier-plugin.md|488 col 11| [Google.FirstPerson] Avoid first-person pronouns such as ' I '.

title: Minifier Plugin
---

# Minifier Plugin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Minifier Plugin' should use sentence-style capitalization.

[INFO] Minification complete. Processed 2 file(s) in 335 ms
```

## How It Works {#how-it-works}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'How It Works' should use sentence-style capitalization.


For projects with more than 10 files, the plugin automatically processes assets in parallel to improve build performance.

### Protocol Resolution {#protocol-resolution}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Protocol Resolution' should use sentence-style capitalization.

URLs without a protocol (e.g., `css/app.css`) are treated as `static/` paths for minification purposes. The static directory can be configured using the `webforj.assetsDir` property. See [Configuration Properties](../configuration/properties) for more information.
:::

## Configuration Options {#configuration-options}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Configuration Options' should use sentence-style capitalization.


## Configuration Options {#configuration-options}

### Disabling Minification {#disabling-minification}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Disabling Minification' should use sentence-style capitalization.

**Common Causes:**

1. **Annotation processor not configured** - Add `webforj-minify-foundation` to `annotationProcessorPaths` in `maven-compiler-plugin`
2. **No annotations in source code** - Ensure you're using `@StyleSheet` or `@JavaScript` annotations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[webforJ.BeDirect] Avoid using 'Ensure you'. Focus more on explicitly giving details about the feature.

2. **No annotations in source code** - Ensure you're using `@StyleSheet` or `@JavaScript` annotations
3. **Annotation processing disabled** - Remove `<proc>none</proc>` from compiler configuration if present

**Verification:** After compilation, check that `target/classes/META-INF/webforj-resources.json` exists
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Colons] ': A' should be in lowercase.


**Verification:** After compilation, check that `target/classes/META-INF/webforj-resources.json` exists

### Asset Files Not Found {#asset-files-not-found}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Asset Files Not Found' should use sentence-style capitalization.

2. Check that the URL protocol matches your directory structure:
- `ws://css/app.css` → `static/css/app.css`
- `context://css/app.css` → `css/app.css`
3. Ensure the file isn't excluded by `.gitignore` or build filters
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[webforJ.BeDirect] Avoid using 'Ensure the file'. Focus more on explicitly giving details about the feature.

- `context://css/app.css` → `css/app.css`
3. Ensure the file isn't excluded by `.gitignore` or build filters

### Minification Syntax Errors {#minification-syntax-errors}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Minification Syntax Errors' should use sentence-style capitalization.

@hyyan hyyan added the status: waiting-for-review The PR is ready. Waiting for team members to review. label Dec 9, 2025
@EHandtkeBasis EHandtkeBasis linked an issue Dec 9, 2025 that may be closed by this pull request
Copy link
Contributor

@laurenic0l laurenic0l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The structure flows well and the troubleshooting section is really helpful. Just a few clarifications needed and it's good to go.


The webforJ Minifier Plugin automatically optimizes CSS and JavaScript assets during the build process. The plugin discovers assets referenced through webforJ [asset annotations](../managing-resources/importing-assets) and minifies them in place, reducing file sizes and improving load times without manual intervention.

For more information about webforJ performance optimization strategies, see [Client/Server Interaction](../architecture/client-server).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cross-reference feels like a stretch here. Client/Server Interaction is about runtime performance (reducing round-trips between browser and server), while this article is about build-time optimization (making files smaller). They're both "performance" topics but in completely different ways.

Consider removing this reference, or rewording to make the connection clearer (e.g., "To understand how minification fits into webforJ's overall architecture...").

- `@StyleSheet`
- `@JavaScript`
- `@InlineStyleSheet`
- `@InlineJavaScript`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@InlineStyleSheet and @InlineJavaScript contain inline content, not file references. Can the plugin actually minify inline strings embedded in Java code? If so, that's worth explaining. If not, these shouldn't be listed here since they don't reference external files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-review The PR is ready. Waiting for team members to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the Minifer plugsins

4 participants