Code Monkey home page Code Monkey logo

appcache-webpack-plugin's People

Contributors

basilfx avatar ccorcos avatar conradz avatar hcschuetz avatar lettertwo avatar theghostbel avatar tomhicks-bsf 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  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  avatar  avatar  avatar  avatar  avatar

appcache-webpack-plugin's Issues

incomplete manifest when webpack --watch

When webpack started with --watch option, the plugin generate full manifest for the first time (OK), but when a watched fie is changed and webpack regenerate outputs, the plugin regenerate the appcache manifest, but it contains only changed files. Unchanged files processed with file-loader are not included nor files from copy-webpack-plugin.

iOS destroys cache after some time

Hello ๐Ÿ‘‹
I am using the plugin for application. It works on desktop and in mobile device (iPhone 5s, iOS 11, Safari). Cache works great and I can use the appication without internet connection.
But, unfortunately, after some hours I can't use it without internet connection and I see the message "Safari cannot open the page because your iPhone is not connected to the internet".๐Ÿ˜ณ

Does cache have lifetime limit?
Or, I think, after some time, iOS starts offload unused data and delete cache. ๐Ÿค”
Does anyone has the same problem?

Add output config

At the very least, make naming of the appcache manifest file configurable.

Multiple AppCachePlugin instances cause caching of the other caches!

We use a build that exports multiple cache manifests, for different devices/platforms. Something like:

plugins: [
  new AppCachePlugin({
    exclude: [/ios/],
    name: "android.appcache"
  }),

  new AppCachePlugin({
    exclude: [/android/],
    name: "ios.appcache"
  })
]

Problem is, that produces an iOS appcache that includes the android appcache! I can't think of any reason why anyone would want to cache the appcache, and in fact that can lead to an impossible-to-update application.

Should we automatically exclude /\/\.appcache$/ files?

Output hashed filename

In your typical webpack config, you can specify the output filename to have hash in it: index-[chunkhash].js, etc. It would be nice if we could do that with the appcache so we don't have caching issues.

%5C in the path of assets

We recently upgraded to webpack 4 and noticing the forward slash has been replaced with %5C in the manifest appcache. I see similar issues posted in the past and have been fixed.

We never had issues in the path only after upgrading to webpack 4, seeing this issue. Let us know the steps to fix it.

Eg: theme%5Cbase.css
Version: [email protected]

Allow assets to be excluded

Conversely, maybe allow only some assets to be included.

new AppcachePlugin
  include: [
    /.*\.js$/
    /.*\.svg$/
  ]
  exclude: [
    /.*\/.js\/.map$/
    /\/thing\.js$/
    /\/icons\/.*\.svg$/
  ]

support custom version format

new AppCacheWebpackPlugin({
  comments: [
    '[hash][YYYY-MM-DD HH:mm:ss]', // compilation hash, compilation time in moment.js format
    'some other comments'
  ]
})

Compilation hash info. is easy to lose, we have to record each release's compilation somewhere, so we need compilation time to known it's which version.
And when I use html-webpack-plugin to generate html file, I just modify the html file template, the compilation hash does not change, maybe it's html-webpack-plugin's duty to update compilation hash, but there are still some edge cases to need additional comments in appcache manifest file.

Webpack 4.0 Support

(node:42631) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at AppCachePlugin.apply (/Users/chet/Code/notion-next/node_modules/appcache-webpack-plugin/lib/index.js:100:16)
    at webpack (/Users/chet/Code/notion-next/node_modules/webpack/lib/webpack.js:37:12)
    at Object.<anonymous> (/Users/chet/Code/notion-next/src/cli/webpack.ts:39:19)
    at step (/Users/chet/Code/notion-next/src/cli/webpack.ts:32:23)
    at Object.next (/Users/chet/Code/notion-next/src/cli/webpack.ts:13:53)
    at /Users/chet/Code/notion-next/src/cli/webpack.ts:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/chet/Code/notion-next/src/cli/webpack.ts:3:12)
    at Object.build [as default] (/Users/chet/Code/notion-next/src/cli/webpack.ts:51:12)
    at Object.<anonymous> (/Users/chet/Code/notion-next/src/cli/client.ts:38:20)

Manifest file lists itsself

Edit: Generalized the issue, since it occurs with all configs.

manifest.appcache is listed as the last item in the CACHE MANIFEST section of the manifest file...

CACHE MANIFEST
# 0d69541ac542a8c13716

[...snipped lots of stuff...]
index.html
manifest.appcache

While, as far as I can tell, this doesn't cause any problems, it doesn't seem like a good idea.

exclude option not working as expected with copy-webpack-plugin.

here is my setting up:

new CopyWebpackPlugin([
    { from: './src/contacts.json' },
    { from: './src/offline.html' }
  ]),
new AppCachePlugin({
      cache: [],
      network: ['contact.json'],
      fallback: ['offline.html'],
      exclude: [
        'contact.json',
        'offline.html'
      ],
      output: 'angular4-ts-webpack2.manifest.appcache'
    })
CACHE MANIFEST
# 8f733b00f56b5349ae47

images/Iverson.599c733dcdf601a1.jpg
scripts/0.DetailModule.d6af6f108f3b17cd.js
scripts/polyfills.8ec46231416fd920.js
scripts/app.a1811fb437250cea.js
scripts/vendor.a52b3c4b85c4f901.js
scripts/0.DetailModule.d6af6f108f3b17cd.js.map
scripts/polyfills.8ec46231416fd920.js.map
scripts/app.a1811fb437250cea.js.map
scripts/vendor.a52b3c4b85c4f901.js.map
scripts/0.DetailModule.d6af6f108f3b17cd.js.gz
scripts/polyfills.8ec46231416fd920.js.gz
scripts/app.a1811fb437250cea.js.gz
scripts/vendor.a52b3c4b85c4f901.js.gz
index.html
contacts.json

NETWORK:
contact.json

FALLBACK:
offline.html

pay attention to the contact.json file. This file should not be in CACHE list.

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.