Skip to content

Instantly share code, notes, and snippets.

@MrJmpl3
Last active July 28, 2019 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrJmpl3/ff8056e624a694dfe044b02f08ab8f7b to your computer and use it in GitHub Desktop.
Save MrJmpl3/ff8056e624a694dfe044b02f08ab8f7b to your computer and use it in GitHub Desktop.
Configurar Vuetify-Loader en Nuxt (Vuetify 2.0)
const sass = require('sass');
const fibers = require('fibers');
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
const nodeExternals = require('webpack-node-externals');
const webpackPlugins = () => {
const plugins = [];
plugins.push(new VuetifyLoaderPlugin());
return plugins;
};
export default {
plugins: ['@/plugins/vuetify.js'],
build: {
transpile: [/^vuetify/],
loaders: {
sass: {
implementation: sass,
fiber: fibers,
indentedSyntax: true
},
scss: {
implementation: sass,
fiber: fibers
}
},
plugins: webpackPlugins(),
},
extend(config, ctx) {
if (process.server) {
config.externals = [
nodeExternals({
whitelist: [/^vuetify/]
})
];
}
}
}
@import '~vuetify/src/styles/styles.sass';
import '../assets/styles/styles.scss';
import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import es from 'vuetify/lib/locale/es';
// Vue.use(Vuetify, {
// components: {
// VCard,
// VRating,
// VToolbar,
// },
// directives: {
// Ripple,
// },
// })
Vue.use(Vuetify);
// const vuetify = new Vuetify({
// icon: 'mdi',
// lang: {
// current: 'es',
// locales: { es }
// },
// breakpoint: {
// thresholds: {
// xs: 576,
// sm: 768,
// md: 992,
// lg: 1200
// }
// }
// });
const vuetify = new Vuetify({});
export default ({ app }, inject) => {
app.vuetify = vuetify;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment