Not scanning some files
See original GitHub issueI have a Quasar App that uses UnoCSS and Webpack.
When I build my app for production it’s not including styles that are only found in my components.
I have a simple component (in src/components/TestComponent.vue):
<template>
<div>
<div class="p-3 lg:p-4">test</div>
</div>
</template>
The padding does not show.
I add the styles p-3 lg:p-4
to a page (in src/pages/IndexPage.vue) and it’s now picked up by the build process and I now see the padding on my component and everywhere else.
I don’t have this issue when I’m in dev mode … quasar dev
I’m trying to unserstand why my components are not picked up, any ideas?
here is my quasar.config.js file:
/* eslint-env node */
/*
* This file runs in a Node context (it's NOT transpiled by Babel), so use only
* the ES6 features that are supported by your Node version. https://node.green/
*/
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js
const ESLintPlugin = require('eslint-webpack-plugin')
const { configure } = require('quasar/wrappers')
const path = require('path')
const env = require('dotenv').config().parsed
const UnoCSS = require('@unocss/webpack').default
const presetUno = require('@unocss/preset-uno').default
module.exports = configure(function (ctx) {
return {
// https://v2.quasar.dev/quasar-cli-webpack/supporting-ts
supportTS: false,
// https://v2.quasar.dev/quasar-cli-webpack/prefetch-feature
// preFetch: true,
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-webpack/boot-files
boot: ['i18n', 'axios', 'UnoCSS'],
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-css
css: ['app.scss'],
// https://github.com/quasarframework/quasar/tree/dev/extras
extras: [
'ionicons-v4',
// 'mdi-v5',
'fontawesome-v6',
// 'eva-icons',
// 'themify',
// 'line-awesome',
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
'roboto-font', // optional, you are not bound to it
'material-icons' // optional, you are not bound to it
],
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-build
build: {
env: {
API_URL: env.API_URL,
SITE_URL: env.SITE_URL
},
vueRouterMode: 'history', // available values: 'hash', 'history'
extendWebpack (cfg) {
cfg.resolve.alias = {
...cfg.resolve.alias,
use: path.resolve(__dirname, './src/use')
}
cfg.plugins.push(
UnoCSS({
theme: {
colors: {
primary: '#5658ED',
secondary: '#DDDEFB',
negative: '#F97066',
accent: '#EFEFFE',
dark: '#1D1D1D',
darker: {
primary: '#4747C2'
},
light: '#D0D5DD',
demi: '#8794F4',
fonce: '#2B336D',
gray: '#667085',
black: {
mate: '#101828'
},
rose: {
pale: '#FFE5D9',
primary: '#FFC6B2'
},
error: '#B42318'
},
boxShadow: {
lightAccent: '0px 1px 2px rgba(16, 24, 40, 0.05)',
lightGray: '0px 4px 4px rgba(0, 0, 0, 0.25)'
}
},
presets: [presetUno()],
shortcuts: {
'page-container': 'max-w-[850px] px-10 mb-10 mx-auto'
}
})
)
},
// transpile: false,
// publicPath: '/',
// Add dependencies for transpiling with Babel (Array of string/regex)
// (from node_modules, which are by default not transpiled).
// Applies only if "transpile" is set to true.
// transpileDependencies: [],
// rtl: true, // https://quasar.dev/options/rtl-support
// preloadChunks: true,
// showProgress: false,
// gzip: true,
// analyze: true,
// Options below are automatically set depending on the env, set them if you want to override
// extractCSS: false,
// https://v2.quasar.dev/quasar-cli-webpack/handling-webpack
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
chainWebpack (chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js', 'vue'] }])
}
},
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-devServer
devServer: {
server: {
type: 'http'
},
port: 8085,
historyApiFallback: {
// needed to allow dots in route params see https://stackoverflow.com/questions/45280091/vue-router-does-not-catch-routes-with-a-dot-in-the-webpack-template
disableDotRule: true
},
open: false // opens browser window automatically
},
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-framework
framework: {
config: {},
// iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack
// For special cases outside of where the auto-import strategy can have an impact
// (like functional components as one of the examples),
// you can manually specify Quasar components/directives to be available everywhere:
//
// components: [],
// directives: [],
// Quasar plugins
plugins: [
'Loading'
]
},
// animations: 'all', // --- includes all animations
// https://quasar.dev/options/animations
animations: [],
// https://v2.quasar.dev/quasar-cli-webpack/developing-ssr/configuring-ssr
ssr: {
pwa: false,
// manualStoreHydration: true,
// manualPostHydrationTrigger: true,
prodPort: 3000, // The default port that the production server should use
// (gets superseded if process.env.PORT is specified at runtime)
maxAge: 1000 * 60 * 60 * 24 * 30,
// Tell browser when a file from the server should expire from cache (in ms)
chainWebpackWebserver (chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }])
},
middlewares: [
ctx.prod ? 'compression' : '',
'render' // keep this as last one
]
},
// https://v2.quasar.dev/quasar-cli-webpack/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
// for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
// if using workbox in InjectManifest mode
chainWebpackCustomSW (chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }])
},
manifest: {
name: 'Carelancer',
short_name: 'Carelancer',
description: 'A Quasar Project',
display: 'standalone',
orientation: 'portrait',
background_color: '#ffffff',
theme_color: '#027be3',
icons: [
{
src: 'icons/icon-128x128.png',
sizes: '128x128',
type: 'image/png'
},
{
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
src: 'icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
},
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-cordova-apps/configuring-cordova
cordova: {
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
},
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
},
// Full list of options: https://v2.quasar.dev/quasar-cli-webpack/developing-electron-apps/configuring-electron
electron: {
bundler: 'packager', // 'packager' or 'builder'
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration
appId: 'carelancer-frontend'
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
chainWebpackMain (chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }])
},
chainWebpackPreload (chain) {
chain
.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }])
}
}
}
})
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Why some files are not scanning... Solved! - Emby
It appeared to be the folder/file structure that caused the scanning to skip some of the movies. This issue seems to be centered...
Read more >Why is some of my content not found? - Support - Plex
The biggest reason by far for items to not be found during a library scan is due to naming. Plex's scanners are generally...
Read more >Plex not scanning for library files - Reddit
I recently added some stuff to my Plex server, and when scanning for new files, it does next to nothing. It will show...
Read more >Use the System File Checker tool to repair missing or ...
Describes how to use the System File Checker tool to troubleshoot missing or corrupted system files in Windows 8.1, Windows 8, Windows 7...
Read more >Troubleshoot scanner issues when scanning using Acrobat
If a TWAIN file is missing or damaged, then Acrobat returns an error message when you try to scan using the TWAIN interface....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After many days of scratching heads and trying to resolved this, we switched to quasar with vite and the build process works now.
Thanks, we actually wanted to try Vite out for a while now. Very happy with it.
If it helps anybody else, the issue with Webpack seem to be a mixture of some styles not being picked up in our vue files and some chunks not being loaded.
As far as we’re concerned our issue is resolved. Thank you the help and for unocss!