Skip to content

A simple Webpack + vue-loader setup for quick prototyping.

Notifications You must be signed in to change notification settings

lienoil/webpack-umd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

webpack-umd

A simple Vue 2.0 Webpack & vue-loader setup for quick prototyping. Note this template is not suitable for production - for that you may want to wait for an official 2.0 webpack template.

This template is Vue 2.0 compatible. For Vue 1.x use this command: vue init lioneil/webpack-umd#1.0 my-project

Usage

This is a project template for vue-cli.

$ npm install -g vue-cli
$ vue init lioneil/webpack-umd my-project
$ cd my-project
$ npm install
$ npm run dev

Build

To build UMD javascripts:

$ npm run build

To change the component name, edit build/production.js

// build/production.js
function install (Vue) {
  Vue.component('change-me', Component);
};
<link rel="stylesheet" href="/dist/my-project.min.css">
...

<my-project></my-project>

...
<script src="/dist/my-project.min.js"></script>

What's Included

  • npm run dev: Webpack + vue-loader with proper config for source maps & hot-reload.

  • npm run build: build with CSS/UMD JS minification.

For detailed explanation on how things work, consult the docs for vue-loader. Also check out the breaking changes in [email protected].

Fork It And Make Your Own

You can fork this repo to create your own boilerplate, and use it with vue-cli:

vue init username/repo my-project

About

A simple Webpack + vue-loader setup for quick prototyping.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.2%
  • Vue 18.0%
  • HTML 4.8%