Skip to content

Instantly share code, notes, and snippets.

@dushyant89
Last active June 11, 2018 11:38
Show Gist options
  • Save dushyant89/048d4994e4c80358ef9166817dce4750 to your computer and use it in GitHub Desktop.
Save dushyant89/048d4994e4c80358ef9166817dce4750 to your computer and use it in GitHub Desktop.
vue webpack module config
module: {
rules: [
{
// vue-loader config to load `.vue` files or single file components.
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// https://vue-loader.vuejs.org/guide/scoped-css.html#mixing-local-and-global-styles
css: ['vue-style-loader', {
loader: 'css-loader',
}],
js: [
'babel-loader',
],
},
cacheBusting: true,
},
},
{
// This is required for other javascript modules you are gonna write besides vue.
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('node_modules/webpack-dev-server/client'),
],
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment