Skip to content

Instantly share code, notes, and snippets.

@andersevenrud
Created February 2, 2019 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andersevenrud/5573f4c4b8f514dbe066d130737eb6ad to your computer and use it in GitHub Desktop.
Save andersevenrud/5573f4c4b8f514dbe066d130737eb6ad to your computer and use it in GitHub Desktop.
Adding custom icon to OS.js v3 package

In your package

  1. Install webpack plugin to copy files npm install copy-webpack-plugin
  2. Place your icon.png in the directory
  3. Update webpack config -- see file below
  4. Update package metadata --- see file below
  5. Run npm run build

In your installation

npm run package:discover

{
"icon": "icon.png"
}
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
plugins: [
new CopyWebpackPlugin([
'icon.png'
])
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment