npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-webpack

v1.10.2

Published

Webpack configuration object generator for Vue.js.

Downloads

127

Readme

vue-webpack

Webpack configuration object generator for Vue.js.

DEPRECATED WARNING: This package is not maintained any more since it's difficult to say what configuration is right for every Vue.js project. See the vue-example on how to setup your Vue.js project.

Webpack is one of the leading module bundlers these days, but many developers still find the setup to be very complicated. Vue.js on the other hand is simple, but probably the hardest part represents the Webpack configuration.

This package provides an easy way to generate a Webpack configuration object.

This is an open source package for Vue.js. The source code is available on GitHub where you can also find our issue tracker.

Related Projects

Install

Run the command below to install the package with all required peer dependencies.

$ npm install --save-dev babel-core babel-loader babel-polyfill babel-preset-es2015 css-loader [email protected] inline-environment-variables-webpack-plugin file-loader postcss-cssnext vue-loader [email protected] webpack-hot-middleware webpack-manifest-plugin
$ npm install --save-dev vue-webpack

Create a new file ./.babelrc and configure the presets.

{
  "presets": [
    "es2015"
  ]
}

Usage

import {build} from 'vue-webpack';

const config = build({
  env: 'development',
  mode: 'server',
  inputFilePath: './src/client/server-entry.js',
  outputFileName: 'bundle',
  outputPath: './dist'
}); // -> Webpack configuration object suitable for rendering Vue.js applications.

API

build(options):Object

Builds and returns a Webpack configuration object.

| Option | Type | Required | Default | Description |--------|------|----------|---------|------------ | inputFilePath | String | Yes | - | The path to Vue.js entry file (make sure that you set the right entry file based on mode). | inputRootPath | String | No | inputFilePath folder | The path to the Vue.js application's root directory. | env | String | No | development | The environment name (use deveoplent or production). This value can also be set through the process.env.NODE_ENV environment variable. | hotReload | Boolean | No | true when env=development, otherwise always false | If set to true then Webpack's hot-reload function is included. | manifest | Boolean | No | false | When set tot true, the manifest files is created. | minify | Boolean | No | false when env=development, otherwise true | If set to true then CSS code is minified. | mode | String | No | client | Vue.js application mode (use server or client). This value can also be set through the process.env.VUE_ENV environment variable. | outputFileName | String | No | bundle | The name of the bundle file (e.g. bundle.js). | outputPath | String | No | ./dist | The path to the output folder. | publicPath | String | No | / | The public path for the assets (e.g. if set to /assets then files are available at http://domain.com/assets). This variable should only be set when building a configuration object for a client. | splitStyle | Boolean | No | true | When set to true, javascript and css code are stored into separated files. | uglify | Boolean | No | false when env=development, otherwise true | If set to true then Javascript code is minified.

License (MIT)

Copyright (c) 2016 Kristijan Sedlak <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.