Last active
July 28, 2019 18:15
-
-
Save MrJmpl3/ff8056e624a694dfe044b02f08ab8f7b to your computer and use it in GitHub Desktop.
Configurar Vuetify-Loader en Nuxt (Vuetify 2.0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/] | |
}) | |
]; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '~vuetify/src/styles/styles.sass'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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