Skip to content

Commit

Permalink
fix: asmCrypto is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox authored and Jack-Works committed Sep 18, 2019
1 parent 1efae8d commit 87210f7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ package-lock.json
build/
dist/
public/polyfill
src/polyfill
3 changes: 2 additions & 1 deletion config-overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const argv = require('yargs').argv
const polyfills = [
'node_modules/webextension-polyfill/dist/browser-polyfill.min.js',
'node_modules/webextension-polyfill/dist/browser-polyfill.min.js.map',
'src/polyfill/asmcrypto.js',
].map(src)

const publicDir = src('./public')
Expand Down Expand Up @@ -123,7 +124,7 @@ function override(config, env) {
if (env !== 'development') {
config.plugins.push(new SSRPlugin('popup.html', src('./src/extension/popup-page/index.tsx')))
config.plugins.push(new SSRPlugin('index.html', src('./src/index.tsx')))
polyfills.map(x => fs.copyFileSync(x, path.join(publicPolyfill, path.basename(x))))
polyfills.map(x => void fs.copyFileSync(x, path.join(publicPolyfill, path.basename(x))))
}

// Let webpack build to es2017 instead of es5
Expand Down
1 change: 1 addition & 0 deletions config-overrides/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="/polyfill/browser-polyfill.min.js"></script>
<script src="/polyfill/asmcrypto.js"></script>
<script src="/firefoxFix.js"></script>
</head>
<body></body>
Expand Down
14 changes: 14 additions & 0 deletions src/polyfill/asmcrypto.js

Large diffs are not rendered by default.

0 comments on commit 87210f7

Please sign in to comment.