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

Add support for not having to pin strip-ansi #1286

Closed
TheLarkInn opened this issue Jan 19, 2018 · 8 comments
Closed

Add support for not having to pin strip-ansi #1286

TheLarkInn opened this issue Jan 19, 2018 · 8 comments

Comments

@TheLarkInn
Copy link
Member

Currently we've had to pin @sindresorhus's strip-ansi because of the use of arrow functions. We should essentially make whatever changes needed to allow us to use that code (transpilation etc.) so that it still works for strip-ansi@4+ but without breaking IE 11 compat.

See #1273

@alexander-akait
Copy link
Member

@TheLarkInn need patch release after merge, otherwise babel would be a more rational solution

@lydell
Copy link

lydell commented Jan 19, 2018

See #1279 for a potential solution of running node_modules through Babel.

@TheLarkInn
Copy link
Member Author

TheLarkInn commented Jan 19, 2018 via email

@wayofthefuture
Copy link

Broke the entire build

@kaiyoma
Copy link

kaiyoma commented Jan 23, 2018

This is causing issues with our project too. If I try to upgrade to the latest version, I start getting yarn errors:

error "nyc#string-width#strip-ansi" is wrong version: expected "4.0.0", got "3.0.1"
warning "nyc#string-width#strip-ansi#ansi-regex@^2.0.0" could be deduped from "2.1.1" to "ansi-regex@2.1.1"
error "nyc#strip-ansi#ansi-regex" is wrong version: expected "3.0.0", got "2.1.1"
error Found 2 errors.

We're currently on version 2.10.0 and would like to upgrade as the dev server is broken in IE11 in this version.

@robvree
Copy link

robvree commented Feb 2, 2018

This is also breaking our dev build in IE11. Running node_modules through babel is not a solution. Everything in node_modules should already be transpiled.

@robvree
Copy link

robvree commented Feb 2, 2018

Update: Updating from 2.11.0 to 2.11.1 (which uses v3 of strip-ansi) and moving my polyfill for es6-object-assign above the first import in my entry point (not sure if this is related) has fixed my IE11 build.

// polyFills for IE11 that need to run before the imports
require("es6-object-assign").polyfill();

// react-hot-loader must come before importing React
import "react-hot-loader";
import * as React from "react";
import { render } from "react-dom";
import App from "./staffhub/sh-application/components/App";
import DateUtils from "sh-application/utility/DateUtils";
import StringsStore from "sh-strings/store";
import { loadTheme } from "@uifabric/styling";
import { preinitApplication } from "sh-application";
import { initializeIcons } from "@uifabric/icons";

// polyFills for IE11
require("es6-promise").polyfill();
require("string.prototype.startswith");
require("element-closest");
require("ie-array-find-polyfill");
require("array.from").shim();
require("array.prototype.findIndex").shim();

@alexander-akait
Copy link
Member

Done for v4

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

No branches or pull requests

7 participants