+
Skip to content

feat(nx-plugin): update tailwind to version 4.x #1691

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

Closed
wants to merge 7 commits into from
Closed
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [1.16.0-beta.2](https://github.com/analogjs/analog/compare/v1.16.0-beta.1...v1.16.0-beta.2) (2025-04-16)

### Bug Fixes

- **vite-plugin-nitro:** fix behavior when opting out of prerendering ([#1688](https://github.com/analogjs/analog/issues/1688)) ([aa7f02a](https://github.com/analogjs/analog/commit/aa7f02abc457d2d8d7a2af97b4fb1847ebb0ae19))

# [1.16.0-beta.1](https://github.com/analogjs/analog/compare/v1.15.1...v1.16.0-beta.1) (2025-04-10)

### Features

- **vite-plugin-nitro:** make source root configurable/optional ([#1681](https://github.com/analogjs/analog/issues/1681)) ([6477173](https://github.com/analogjs/analog/commit/6477173e7b4ab3759421b96bbd4c6df1aea25b05))

## [1.15.1](https://github.com/analogjs/analog/compare/v1.15.0...v1.15.1) (2025-04-09)

### Bug Fixes
Expand Down
12 changes: 3 additions & 9 deletions apps/docs-app/docs/features/server/server-side-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For more information about externals with SSR, check out the [Vite documentation

## Hybrid Rendering with Client-Only Routes

SSR is enabled by default. For a hybrid approach, you can specific some routes to only be rendered client-side, and not be server side rendered. This is done through the `routeRules` configuration object by specifying an `ssr` option.
SSR is enabled by default. For a hybrid approach, you can specify some routes to only be rendered client-side, and not be server side rendered. This is done through the `routeRules` configuration object by specifying an `ssr` option.

```ts
import { defineConfig } from 'vite';
Expand Down Expand Up @@ -94,24 +94,18 @@ export default defineConfig(({ mode }) => ({
}));
```

You can opt out of prerendering by passing an empty array of routes and disabling prerender on the root route.
You can opt-out of prerendering altogether by passing an empty array of routes.

```js
import { defineConfig } from 'vite';
import analog from '@analogjs/platform';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
// ...other config
plugins: [
analog({
ssr: true,
nitro: {
routeRules: {
'/': {
prerender: false,
},
},
},
prerender: {
routes: async () => {
return [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "analogjs-platform",
"version": "1.15.1",
"version": "1.16.0-beta.2",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/astro-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@analogjs/astro-angular",
"version": "1.15.1",
"version": "1.16.0-beta.2",
"description": "Use Angular components within Astro",
"type": "module",
"author": "Brandon Roberts <robertsbt@gmail.com>",
Expand Down Expand Up @@ -32,7 +32,7 @@
"url": "https://github.com/sponsors/brandonroberts"
},
"dependencies": {
"@analogjs/vite-plugin-angular": "^1.15.1"
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2"
},
"peerDependencies": {
"@angular-devkit/build-angular": ">=16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/content/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@analogjs/content",
"version": "1.15.1",
"version": "1.16.0-beta.2",
"description": "Content Rendering for Analog",
"type": "module",
"author": "Brandon Roberts <robertsbt@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-analog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-analog",
"version": "1.15.1",
"version": "1.16.0-beta.2",
"type": "module",
"license": "MIT",
"author": "Brandon Roberts",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-angular-v16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"test": "ng test"
},
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^16.2.0",
"@angular/common": "^16.2.0",
"@angular/compiler": "^16.2.0",
Expand All @@ -38,9 +38,9 @@
"zone.js": "~0.13.0"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular-devkit/build-angular": "^16.2.0",
"@angular/cli": "^16.2.0",
"@angular/compiler-cli": "^16.2.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-angular-v17/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"test": "ng test"
},
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^17.2.0",
"@angular/common": "^17.2.0",
"@angular/compiler": "^17.2.0",
Expand All @@ -38,9 +38,9 @@
"zone.js": "~0.14.0"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular-devkit/build-angular": "^17.2.0",
"@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^17.2.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-angular-v18/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"private": true,
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^18.0.0",
"@angular/build": "^18.0.0",
"@angular/common": "^18.0.0",
Expand All @@ -38,9 +38,9 @@
"zone.js": "~0.14.3"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular/cli": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"jsdom": "^22.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"private": true,
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
Expand All @@ -36,9 +36,9 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular-devkit/build-angular": "^19.0.0",
"@angular/build": "^19.0.0",
"@angular/cli": "^19.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"private": true,
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
Expand All @@ -37,9 +37,9 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular-devkit/build-angular": "^19.0.0",
"@angular/build": "^19.0.0",
"@angular/cli": "^19.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/create-analog/template-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"private": true,
"dependencies": {
"@analogjs/content": "^1.15.1",
"@analogjs/router": "^1.15.1",
"@analogjs/content": "^1.16.0-beta.2",
"@analogjs/router": "^1.16.0-beta.2",
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
Expand All @@ -37,9 +37,9 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@analogjs/platform": "^1.15.1",
"@analogjs/vite-plugin-angular": "^1.15.1",
"@analogjs/vitest-angular": "^1.15.1",
"@analogjs/platform": "^1.16.0-beta.2",
"@analogjs/vite-plugin-angular": "^1.16.0-beta.2",
"@analogjs/vitest-angular": "^1.16.0-beta.2",
"@angular-devkit/build-angular": "^19.0.0",
"@angular/build": "^19.0.0",
"@angular/cli": "^19.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import analog from '@analogjs/platform';
import { defineConfig, Plugin, splitVendorChunkPlugin } from 'vite';
import tsConfigPaths from 'vite-tsconfig-paths';
<% if (addTailwind) { %>
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';
<% } %>

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -17,6 +21,9 @@ export default defineConfig(({ mode }) => {
target: ['es2020'],
},
plugins: [
<% if (addTailwind) { %>
tailwindcss(),
<% } %>
<% if (addTRPC) { %>
analog({
nitro: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import analog from '@analogjs/platform';
import { defineConfig, Plugin, splitVendorChunkPlugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
<% if (addTailwind) { %>
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';
<% } %>

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -17,15 +21,18 @@ export default defineConfig(({ mode }) => {
<% } %>
build: {
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
reportCompressedSize: true,
reportCompressedSize: true,
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
},
plugins: [
<% if (addTailwind) { %>
tailwindcss(),
<% } %>
<% if (addTRPC) { %>
analog({
nitro: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import analog from '@analogjs/platform';
import { defineConfig, Plugin, splitVendorChunkPlugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
<% if (addTailwind) { %>
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';
<% } %>

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -16,15 +20,18 @@ export default defineConfig(({ mode }) => {
<% } %>
build: {
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
reportCompressedSize: true,
reportCompressedSize: true,
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
},
plugins: [
<% if (addTailwind) { %>
tailwindcss(),
<% } %>
<% if (addTRPC) { %>
analog({
nitro: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import analog from '@analogjs/platform';
import { defineConfig, Plugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
<% if (addTailwind) { %>
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';
<% } %>

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -16,15 +20,18 @@ export default defineConfig(({ mode }) => {
<% } %>
build: {
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
reportCompressedSize: true,
reportCompressedSize: true,
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
},
plugins: [
<% if (addTailwind) { %>
tailwindcss(),
<% } %>
<% if (addTRPC) { %>
analog({
nitro: {
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载