Newsworthy Presidential Mistakes
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    webpack-assetgraph-pluginpublic

    webpack-assetgraph-plugin

    NPM version Build Status Coverage Status Dependency Status

    This webpack plugin leverages the very powerful Assetgraph dependency graph model discover assets that webpack doesn't know about. It then adds these assets into webpacks compilation.

    This means you can reduce your configuration by avoiding manual maintenance of a manifest of files that need to be copied to the output destination after a build.

    Currently webpack-assetgraph-plugin hooks into html-webpack-plugin's html-webpack-plugin-after-emit-hook. This makes html-webpack-plugin a hard dependency for now, which might change in the future.

    Usage

    In your Webpack configuration add webpack-assetgraph-plugin like so:

    var WebpackAssetgraphPlugin require('webpack-assetgraph-plugin');
     
    module.exports = {
      context: 'path/to/source/root',
      plugins: [
        new WebpackAssetgraphPlugin({
          verbose: true
        })
      ]
    }

    Configuring context is important! Assetgraph needs an understanding of what your web root is in order to resolve root-relative urls.

    If you don't define context it will default to process.cwd(), which is usually not correct.

    Licence

    MIT

    install

    npm i webpack-assetgraph-plugin

    Downloadsweekly downloads

    0

    version

    0.1.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar