8000 Improve v3 docs regarding compatibility with vite_rails by mattbrictson · Pull Request #8549 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Improve v3 docs regarding compatibility with vite_rails #8549

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/0-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ You can **opt-in to using Webpacker for ActiveAdmin assets** as well by updating
rails g active_admin:webpacker
```

## vite_rails

To use Active Admin with Vite, make sure the `@activeadmin/activeadmin` dependency is added to your `package.json` using e.g. Yarn:

```sh
yarn add @activeadmin/activeadmin@^3
```

Then follow the steps outlined in this discussion comment: https://github.com/activeadmin/activeadmin/discussions/7947#discussioncomment-5867902


[CHANGELOG]: https://github.com/activeadmin/activeadmin/blob/master/CHANGELOG.md
[dashboard.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb
[active_admin.rb]: https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/active_admin.rb.erb
Expand Down
8 changes: 8 additions & 0 deletions docs/14-gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ To avoid overriding your application styles with the ActiveAdmin styles,
remove the `require_tree` command from your application's CSS files, where
the `active_admin.scss` is in the tree.

## Deprecation warnings with modern sass build tools

Active Admin v3's SCSS is written for [sassc](https://rubygems.org/gems/sassc), which follows an older version of the SCSS specification. If you use a Node-based build system like esbuild, webpacker, or vite, you may encounter deprecation warnings for color functions like this when compiling assets:

> DEPRECATION WARNING: lighten() is deprecated

As a quick workaround, you may be able to silence these warnings by passing the `quietDeps` scss compilation option in your build system. With vite, follow these instructions: <https://github.com/vitejs/vite/discussions/4013#discussioncomment-10793687> (note this requires installing the `sass-embedded` dependency).

## Conflicts

### With gems that provides a `search` class method on a model
Expand Down
0