Skip to content

drupal-webpack/webpack_vuejs

Repository files navigation

Webpack Vue.js

Provides Vue.js configuration for the webpack module.

Dependencies

Installation

  • yarn add vue vue-loader vue-template-compiler

Example usage

module.libraries.yml

test:
  webpack: true
  js:
    index.js: {}

index.js

import Vue from 'vue';
import Component from './Component.vue';

Vue.component('test-component', Component);

const app = new Vue({
  el: '#page',
  template: '<test-component />',
});