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
|
||||
|
||||
- [Node.js 8.2+](https://nodejs.org/)
|
||||
- [Node.js 10.0+](https://nodejs.org/)
|
||||
- [Redis server](https://redis.io/) (optional for development)
|
||||
- [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
|
||||
// and use 'fluent' instead of 'fluent/compat' (also below near line 42)
|
||||
require('babel-polyfill');
|
||||
const { MessageContext } = require('fluent/compat');
|
||||
const { MessageContext } = require('fluent');
|
||||
const fs = require('fs');
|
||||
|
||||
function toJSON(map) {
|
||||
|
@ -39,8 +36,7 @@ module.exports = function(source) {
|
|||
return `
|
||||
module.exports = \`
|
||||
if (typeof window === 'undefined') {
|
||||
require('babel-polyfill');
|
||||
var fluent = require('fluent/compat');
|
||||
var fluent = require('fluent');
|
||||
}
|
||||
(function () {
|
||||
var ctx = new fluent.MessageContext('${locale}', {useIsolating: false});
|
||||
|
|
Loading…
Reference in New Issue