-
Notifications
You must be signed in to change notification settings - Fork 106
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
Build mode #154
Comments
dist/vuetify.js
or vuetify-loader
You need add a warning in the auto mode, because full mode and treeShake mode can be different CSS order. |
@MrJmpl3 I'm not sure to understand, auto is already current behavior (last module version), why add a warning ? Could you explain a bit further the CSS order you're talking about ? Thanks :) ! |
Related: vuetifyjs/vuetify#7933 In the full mode, import css and js pre builded , the order of css is correct. But in tree-shake is if you are not cautious with imports the order of css broken the app |
@MrJmpl3 Is the bug of CSS order still reproducible ? (The issue has been closed so..) I would be interested trying to figure out what's going on |
The issue was closed because the solution is be cautious with imports. For example.. import Toolbar from '@/components/organisms/Toolbar.vue';
import Footer from '@/components/organisms/Footer.vue'; The styles of Toolbar is loaded first and second the Footer OR import Footer from '@/components/organisms/Footer.vue';
import Toolbar from '@/components/organisms/Toolbar.vue'; The styles of Footer is loaded first and second the Toolbar Some times don't have problems because the styles don't override , but sometime has problem because the styles of Vuetify Component import global CSS , don't encapsulate the CSS for obvious reason. The Vuetify team say: "We don't specify any order, it's dependant on the build configuration." in others words, depends of the order of the imports |
@MrJmpl3 They are right, I mean it's user problem if his CSS can go crazy with its own customizations. That probably what they meant cause Vuetify components imports don't need specific order to work, so it's only user problem if his CSS is not correctly written. |
For this reason , i recommend add a warning, because , in dev mode you project can be all correct, because the order of the imports don't import , but in production mode, the project will broken because the order of the imports start work. |
Auto would also mean wider browser support in dev than in prod if babel isn't configured properly, and sass variables can't be changed with the full build. |
@KaelWD treeShaking should better always be on by default then right ? |
In Vue CLI Vuetify , tree-shaking is the default option: https://github.com/vuetifyjs/vue-cli-plugin-vuetify/blob/dev/presets/default.json |
Sounds right to be in |
For me, sound good |
Manual build mode is very much required. Currently the tree-shaking components are imported for every page even though they are not used. |
I'm working on it @1hakr :) #177 |
Closed by #177 (possibility to disable automaticImports) |
Is your feature request related to a problem? Please describe.
We're currently not being able to use something else than (
dist/vuetify.js
+dist/vuetify.css
) orvuetify-loader
Describe the solution you'd like
Be able to specify the "build" mode, including the following options :
vuetify-loader
development
(nuxt dev) for faster developmentproduction
(nuxt build)Info: Mode names are susceptible to change
Related issues that should be resolvable with this feature (not using
vuetify-loader
but manually importing components for more granular control)#169
#143
#148
The text was updated successfully, but these errors were encountered: