GithubHelp home page GithubHelp logo

jouni-kantola / inline-chunk-manifest-html-webpack-plugin Goto Github PK

View Code? Open in Web Editor NEW
80.0 7.0 10.0 84 KB

Extension plugin for html-webpack-plugin to inline webpack's chunk manifest. Default inlines in head tag.

License: MIT License

JavaScript 100.00%
html-webpack-plugin webpack chunk manifest

inline-chunk-manifest-html-webpack-plugin's People

Contributors

jouni-kantola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

inline-chunk-manifest-html-webpack-plugin's Issues

If `dropAsset: true` is used to not generate `manifiest.json`, then both the implicit/explictit injections stop working

Without dropAsset, the implicit injection works and manifest is inlined in html:

new InlineChunkManifestHtmlWebpackPlugin()

With dropAsset, the implicit injection doesn't work and manifest is not inlined in html:

new InlineChunkManifestHtmlWebpackPlugin({ dropAsset: true })

With dropAsset, the explicit injection doesn't work and manifest is not inlined in html:

<%= htmlWebpackPlugin.files.webpackChunkManifest %>
new InlineChunkManifestHtmlWebpackPlugin({ dropAsset: true, chunkManifestVariable: 'webpackChunkManifest' })

Integrate / Hook up with HTML Webpack Plugin

Hi @jouni-kantola, thank for this plugin which in my eyes is the leanest approach to the very specific use case it covers.

I had originally tried to cover inlining the chunks manifest by means of HTML Webpack Plugin (or plugins advertised as using its hooks).

Makes me wonder whether you might not want to get in touch with the author of HTML Webpack Plugin as he has offered here: jantimon/html-webpack-plugin#600. Could be an idea to have your plugin listed in his README or find better ways to further integrate your solution.

plugin not working with inject: false

I have such config for html-webpack-plugin:

new HtmlWebpackPlugin({
        template: './index.pug',
        inject: false,

and with inject: false inline-chunk-manifest-html-webpack-plugin does not work, it does not add manifest to head tag. What should I do for inline-chunk-manifest-html-webpack-plugin to work with inject: false?

Need option to disable 'chunk-manifest-webpack-plugin'

chunk-manifest-webpack-plugin doesn't provide enough information(only chunks).
I need to use webpack-manifest-plugin.

Since [email protected]

const ManifestPlugin = require ( 'webpack-manifest-plugin' );
const InlineChunkManifestHtmlWebpackPlugin = require ( 'inline-chunk-manifest-html-webpack-plugin' );

...
plugins: [
    new ManifestPlugin ( { publicPath } ),
    new InlineChunkManifestHtmlWebpackPlugin ( { manifestVariable: 'manifest' } ),
  ]
...

Using like above makes System.import('filename') fail.

Maybe providing necessary plugin from a user like before is better idea?

chunk-manifest-webpack-plugin should be a peerDependency

chunk-manifest-webpack-plugin should be a peerDependency. As a nested dependency, the maintainer of this project would need to routinely check and update this project's package.json whenever chunk-manifest-webpack-plugin updates.

Update package.json to allow for webpack ^3.0.0

With webpack ^3.0.0 installed, the dependency of this plugin on "chunk-manifest-webpack-plugin": "~1.0.0" (as listed in package.json) results in a yarn warning:

warning "[email protected]" has incorrect peer dependency "webpack@^2.0.0".

Will you kindly consider whether an update of package.json is doable?

Leaves behind an unused manifest file

Love this plugin!! Thank you for making this. I just noticed one issue and that is it leaves behind the manifest.json file in the build directory. It would really nice if it cleaned up the file after it had injected the contents into index.

Extract installed chunks mapping's variable for improved long-term caching

Hi:
Even if the hash of assets information is extracted from the manifest.js file by html inline. but manifest.js file changes when assets change every time.

this part of the manifest.js file changes every time:

/******/ 	// objects to store loaded and loading chunks
/******/ 	var installedChunks = {
/******/ 		10: 0
/******/ 	};

Unless this part is also extracted from the manifest.js file, cache problem will be solved.

Please add a changelog and 2.0.0 tag

Hey, thanks for this nice package! I’m in a bit of a crunch though, because I need to update from v1.1.2 to v2.0.0 due to a problem with chunk-manifest-webpack-plugin peer dependencies. Can’t figure out what changed though.

Judging by the semver bump there was a breaking change. What was it?

Two things would help greatly: adding a changelog (you can find some good tips at http://keepachangelog.com/en/1.0.0/) and tagging the commits at which you published the package.

Thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.