mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-25 17:25:25 +00:00
Add webpack-subresource-integrity plugin (#789)
* Add subresource integrity * add anonymous crossOriginLoading * add missing ,
This commit is contained in:
parent
5f07814741
commit
9fb9fcd134
@ -121,6 +121,7 @@
|
||||
"webpack-dev-middleware": "2.0.4",
|
||||
"webpack-hot-middleware": "2.21.0",
|
||||
"webpack-sources": "1.0.1",
|
||||
"webpack-subresource-integrity": "1.0.3",
|
||||
"worker-loader": "1.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -4,6 +4,8 @@ const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
const SriPlugin = require('webpack-subresource-integrity');
|
||||
|
||||
const config = require('./config');
|
||||
const _ = require('./utils');
|
||||
|
||||
@ -14,7 +16,8 @@ const webpackConfig = {
|
||||
output: {
|
||||
path: _.outputPath,
|
||||
filename: '[name].js',
|
||||
publicPath: config.publicPath
|
||||
publicPath: config.publicPath,
|
||||
crossOriginLoading: "anonymous"
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.css', '.json', '.scss', '.less'],
|
||||
@ -87,6 +90,10 @@ const webpackConfig = {
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new SriPlugin({
|
||||
hashFuncNames: ['sha256', 'sha384'],
|
||||
enabled: true
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: config.title,
|
||||
template: path.resolve(__dirname, '../common/index.html'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user