Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sapper on Rollup seems to have some difficulties to handle the Typescript from svelte-i18n #5

Open
ktryndchrs opened this issue Jul 13, 2020 · 2 comments

Comments

@ktryndchrs
Copy link

ktryndchrs commented Jul 13, 2020

"svelte-i18n": "^3.0.4"

The returned error:

The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
4: See the accompanying LICENSE file for terms.
5: */
6: var __assign = (this && this.__assign) || function () {
                   ^
7:     __assign = Object.assign || function(t) {
8:         for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
4: See the accompanying LICENSE file for terms.
5: */
6: var __assign = (this && this.__assign) || function () {
                           ^
7:     __assign = Object.assign || function(t) {
8:         for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __extends = (this && this.__extends) || (function () {
                    ^
2:     var extendStatics = function (d, b) {
3:         extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __extends = (this && this.__extends) || (function () {
                            ^
2:     var extendStatics = function (d, b) {
3:         extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
12:     };
13: })();
14: var __spreadArrays = (this && this.__spreadArrays) || function () {
                          ^
15:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
16:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
12:     };
13: })();
14: var __spreadArrays = (this && this.__spreadArrays) || function () {
                                  ^
15:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
16:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
4: See the accompanying LICENSE file for terms.
5: */
6: var __spreadArrays = (this && this.__spreadArrays) || function () {
                         ^
7:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
8:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
4: See the accompanying LICENSE file for terms.
5: */
6: var __spreadArrays = (this && this.__spreadArrays) || function () {
                                 ^
7:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
8:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
 7: // tslint:disable:no-consecutive-blank-lines
 8: // tslint:disable:align
 9: var __extends = (this && this.__extends) || (function () {
                     ^
10:     var extendStatics = function (d, b) {
11:         extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
 7: // tslint:disable:no-consecutive-blank-lines
 8: // tslint:disable:align
 9: var __extends = (this && this.__extends) || (function () {
                             ^
10:     var extendStatics = function (d, b) {
11:         extendStatics = Object.setPrototypeOf ||
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
20:     };
21: })();
22: var __assign = (this && this.__assign) || function () {
                    ^
23:     __assign = Object.assign || function(t) {
24:         for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
20:     };
21: })();
22: var __assign = (this && this.__assign) || function () {
                            ^
23:     __assign = Object.assign || function(t) {
24:         for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __spreadArrays = (this && this.__spreadArrays) || function () {
                         ^
2:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __spreadArrays = (this && this.__spreadArrays) || function () {
                                 ^
2:     for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3:     for (var r = Array(s), k = 0, i = 0; i < il; i++)
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __assign = (this && this.__assign) || function () {
                   ^
2:     __assign = Object.assign || function(t) {
3:         for (var s, i = 1, n = arguments.length; i < n; i++) {
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
1: var __assign = (this && this.__assign) || function () {
                           ^
2:     __assign = Object.assign || function(t) {
3:         for (var s, i = 1, n = arguments.length; i < n; i++) {

The Setup
Sapper-i18n-Rollup.zip

Personnal note
I'll continue to work on it and come back if I ever find the solution

@samcreate
Copy link

@ktryndchrs Found this after I read your issue (I was having the same issue)

https://github.com/kaisermann/svelte-i18n/blob/master/docs/FAQ.md

@UltraCakeBakery
Copy link

I'm having the exact same issue. I also was reading this: rollup/rollup#1518
Hiding the warning as shown in the link posted above works fine.

It does feel like a hack to hide it. Maybe svelte-i18n codebase should be modified. I know it is not harmful but the warning makes a good point lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants