Skip to content

Commit

Permalink
build(gzip): Remove gzip script, use cdn in-fly gzip feature (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcholuj authored Oct 7, 2019
1 parent 494d774 commit 35cca80
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 34 deletions.
55 changes: 23 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,29 @@
**Table of Contents**

<!-- toc -->
- [What's in the box?](#Whats-in-the-box)
- [Installation](#Installation)
- [API Documentation](#API-Documentation)
- [Usage](#Usage)
- [Browsers](#Browsers)
- [ES module](#ES-module)
- [UMD module](#UMD-module)
- [GZIP support](#GZIP-support)
- [SRI](#SRI)
- [Node](#Node)
- [CommonJS module](#CommonJS-module)
- [Module Overview](#Module-Overview)
- [Releases Info](#Releases-Info)
- [Live examples (JSFiddle)](#Live-examples-JSFiddle)
- [Picker Quick Start](#Picker-Quick-Start)
- [Polyfills](#Polyfills)
- [Development](#Development)
- [Debugging](#Debugging)
- [Node](#Node-1)
- [Browser](#Browser)
- [Error event](#Error-event)
- [Sentry Integration](#Sentry-Integration)
- [Versioning](#Versioning)
- [Contributing](#Contributing)
- [What's in the box?](#whats-in-the-box)
- [Installation](#installation)
- [API Documentation](#api-documentation)
- [Usage](#usage)
- [Browsers](#browsers)
- [ES module](#es-module)
- [UMD module](#umd-module)
- [SRI](#sri)
- [Node](#node)
- [CommonJS module](#commonjs-module)
- [Module Overview](#module-overview)
- [Releases Info](#releases-info)
- [Live examples (JSFiddle)](#live-examples-jsfiddle)
- [Picker Quick Start](#picker-quick-start)
- [Polyfills](#polyfills)
- [Development](#development)
- [Debugging](#debugging)
- [Node](#node-1)
- [Browser](#browser)
- [Error event](#error-event)
- [Sentry Integration](#sentry-integration)
- [Versioning](#versioning)
- [Contributing](#contributing)


## What's in the box?
Expand Down Expand Up @@ -95,14 +94,6 @@ where ```{MAJOR_VERSION}``` is one of the MAJOR versions of the filestack-js ie:
</script>
```

#### GZIP support
To speed up library loading you can use gzipped file available after adding gz to file extension
```HTML
<script src="//static.filestackapi.com/filestack-js/{MAJOR_VERSION}.x.x/filestack.min.js.gz" crossorigin="anonymous"></script>
<script>
const client = filestack.init('apikey');
</script>
```

#### SRI
Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match
Expand Down
2 changes: 0 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const webpack = require('webpack');
const CompressionPlugin = require('compression-webpack-plugin');
const path = require('path');
const fs = require('fs');
const EsmWebpackPlugin = require('@purtuga/esm-webpack-plugin');
Expand Down Expand Up @@ -48,7 +47,6 @@ const config = {
],
plugins: [
new CleanWebpackPlugin(),
new CompressionPlugin(),
new webpack.BannerPlugin({ banner }),
new webpack.DefinePlugin({
'process.env.NODE_ENV': 'production',
Expand Down

0 comments on commit 35cca80

Please sign in to comment.