fluent_loader no longer needs polyfill with node 10
This commit is contained in:
parent
e97b8ff42d
commit
a83e0cfbda
|
@ -30,7 +30,7 @@ A file sharing experiment which allows you to send encrypted files to other user
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- [Node.js 8.2+](https://nodejs.org/)
|
- [Node.js 10.0+](https://nodejs.org/)
|
||||||
- [Redis server](https://redis.io/) (optional for development)
|
- [Redis server](https://redis.io/) (optional for development)
|
||||||
- [AWS S3](https://aws.amazon.com/s3/) or compatible service. (optional)
|
- [AWS S3](https://aws.amazon.com/s3/) or compatible service. (optional)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
// TODO: when node supports 'for await' we can remove babel-polyfill
|
const { MessageContext } = require('fluent');
|
||||||
// and use 'fluent' instead of 'fluent/compat' (also below near line 42)
|
|
||||||
require('babel-polyfill');
|
|
||||||
const { MessageContext } = require('fluent/compat');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
function toJSON(map) {
|
function toJSON(map) {
|
||||||
|
@ -39,8 +36,7 @@ module.exports = function(source) {
|
||||||
return `
|
return `
|
||||||
module.exports = \`
|
module.exports = \`
|
||||||
if (typeof window === 'undefined') {
|
if (typeof window === 'undefined') {
|
||||||
require('babel-polyfill');
|
var fluent = require('fluent');
|
||||||
var fluent = require('fluent/compat');
|
|
||||||
}
|
}
|
||||||
(function () {
|
(function () {
|
||||||
var ctx = new fluent.MessageContext('${locale}', {useIsolating: false});
|
var ctx = new fluent.MessageContext('${locale}', {useIsolating: false});
|
||||||
|
|
Loading…
Reference in New Issue