包详细信息

@packmule/vue-pack

packmule226MIT2.1.0

Packmule pack to bundle Vue single-file-components.

webpack, packmule, packmule-pack

自述文件

packmule

packmule is an opinionated, plugin-based configuration generator for webpack.


  • 🏇 Small and simple API.
  • 🧰 Plugins for many use cases.
  • 🔧 Build your own plugin for custom use cases.
  • ⚡ Optimized webpack settings for HTTP/2.
import Packmule from '@packmule/core';
import EntryPack from '@packmule/entry-pack';
import OutputPack from '@packmule/output-pack';
import TypeScriptPack from '@packmule/typescript-pack';

const packmule = new Packmule('production');

packmule.add(new EntryPack('main.ts'));
packmule.add(new OutputPack('public/', '/'));
packmule.add(new TypeScriptPack());

return packmule.generate();

Setup

Current Release

Run the following command within your project directory to install the default edition of packmule which includes the @packmule/core package and most relevant packs.

npm install --save-dev @packmule/default

The complete edition can be installed to have all packs available.

npm install --save-dev @packmule/complete

Alternatively, to have full control over the installed packages, it's possible to install the core package and individual packs.

npm install --save-dev @packmule/core @packmule/entry-pack @packmule/output-pack @packmule/typescript-pack

Nightly Build

All @packmule packages have a nightly build tagged on the npm registry.

npm install --save-dev @packmule/<package>@nightly

Editions

packmule provides editions which install a pre-defined set of packmule packages including various packs and utilities.

It's recommended to install packmule packages individually but editions provide an easy way to get started quickly.

Plugins

packmule plugins are called packs and each one handles generation of a specific webpack configuration part. Several packs expose API methods to include or exclude files from processing using file globbing) or regular expression patterns.

Utilities

License

MIT license


更新日志

Change Log

next

added

  • Add plugin method to the raw pack.
  • Add hints configuration options.
  • Add minimum compression ratio option to the compression pack.
  • Add edition packages to ease setup of basic packmule projects.
  • Add fix option for linter configuration in the sass, javascript and typescript packs.
  • Add resolve-url-loader in the sass pack to resolve relative URLs.
  • Add cache method to the service-worker pack to configure runtime caching.
  • Add modules method to the sass pack to be able to use CSS modules.
  • Add browserstack support to the server utility.
  • Add svelte pack.
  • Add environment pack.
  • Add less pack.
  • Add watch pack.
  • Add cache pack.
  • Add target pack.
  • Add analyzer pack.

changed

  • Split packmule options into options and hints.
  • Change the package namespace from @pixelart to @packmule.
  • Convert project to a monorepo structure and move packs to separate packages.
  • Accept multiple configurations on the development server.
  • Disable verbose output on the clean-webpack-plugin used by the clean pack.
  • Disable the overlay on the HMR client by default.
  • Disable the default vendors chunk configuration on webpack.
  • Remove watch configuration from the core and introduce a separate watch pack.
  • Disable bundle chunks in watch mode for faster builds.
  • Pass options and hints to the packs process function.
  • Use eslint-webpack-plugin instead of eslint-loader.

removed

  • Remove constructor on the clean pack.

fixed

  • Prepend polyfills to the entry array in the HMR pack to work properly.
  • Disable webpackbar when webpack is run with the --json option.

misc

  • Add tests.
  • Configure nightly builds.

1.0.0

  • Initial release.