Skip to content
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

Tailwindcss 3 loading after 500ms-1sec #134

Closed
binods-gintaa opened this issue Feb 1, 2022 · 3 comments
Closed

Tailwindcss 3 loading after 500ms-1sec #134

binods-gintaa opened this issue Feb 1, 2022 · 3 comments

Comments

@binods-gintaa
Copy link

binods-gintaa commented Feb 1, 2022

Environment

Reproduction

Configure tailwind css 3 with nuxt bridge project
https://tailwindcss.com/docs/guides/nuxtjs

Then simply run yarn dev

Describe the bug

Tailwind css 3 with nuxt bridge
Loading after 1 second
It is occurring for build as well as dev time

Additional context

`
// nuxt.config.js

import { defineNuxtConfig } from '@nuxt/bridge'

export default defineNuxtConfig({
// bridge: false,

// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'gintaa-web-app-nuxt',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},

// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'@/assets/css/main.css',
],

// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
],

// Auto import components: https://go.nuxtjs.dev/config-components
components: true,

// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/tailwindcss
// '@nuxtjs/tailwindcss'
'@nuxt/postcss8'
],

// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
// '@nuxtjs/pwa',
'@nuxtjs/firebase'
],

// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: nuxt-community/axios-module#308
baseURL: 'https://dev.api.gintaa.com/'
},

// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'en'
}
},

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
},

env: {
FIRE_ENV: process.env.NODE_ENV
},
firebase: {
config: {
development: {
apiKey: '',
authDomain: '
',
databaseURL: '',
projectId: '
',
storageBucket: '',
messagingSenderId: '
',
appId: '',
measurementId: '
',
},
alpha: {
apiKey: '',
authDomain: '
',
databaseURL: '',
projectId: '
',
storageBucket: '',
messagingSenderId: '
',
appId: '',
measurementId: '
',
}
},
services: {
auth: true,
firestore: true,
functions: true,
storage: true,
database: true,
messaging: true,
performance: true,
analytics: true,
remoteConfig: true
}
},
analytics: {
collectionEnabled: true // default
},
remoteConfig: {
settings: {
fetchTimeoutMillis: 60000, // default
minimumFetchIntervalMillis: 43200000 // default
},
defaultConfig: {
// 'welcome_message': 'Welcome'
}
},

tailwindcss: {
viewer: false
},
alias: {
tslib: 'tslib/tslib.es6.js'
}
})

`

Logs

No response

@danielroe
Copy link
Member

Would you provide a reproduction? 🙏

Is this different behaviour compared to enabling bridge vs not enabling bridge? Do you mean the styles aren't visible for .5-1s? Or the page doesn't load?

@binods-gintaa
Copy link
Author

binods-gintaa commented Feb 1, 2022

Hi @danielroe , Thanks for quick reply

  1. Create nuxt 2 project
  2. Add tailwind css https://tailwindcss.com/docs/guides/nuxtjs
  3. Enable nuxt bridge as per https://v3.nuxtjs.org/getting-started/bridge/

After 1 & 2 it will work file but after point 3 facing the issue

Style is not visible

@danielroe
Copy link
Member

I belive this is a duplicate of #26. Let's follow there.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2022
@pi0 pi0 transferred this issue from nuxt/framework Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants