-
Notifications
You must be signed in to change notification settings - Fork 53
fix(plugins): use compiled dependency instead of css-expand-shorthand
#1542
Conversation
@@ -32,24 +31,14 @@ | |||
</style> | |||
</head> | |||
<body> | |||
<script src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7/dist/polyfill.min.js"></script> | |||
<script src='https://cdn.jsdelivr.net/npm/core-js-bundle/minified.js'></script> | |||
<script src='https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js'></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch()
is not supported by IE11
@@ -32,24 +31,14 @@ | |||
</style> | |||
</head> | |||
<body> | |||
<script src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7/dist/polyfill.min.js"></script> | |||
<script src='https://cdn.jsdelivr.net/npm/core-js-bundle/minified.js'></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core-js-bundle
is bundled version of core-js
which is a successor for @babel/polyfill
:
https://babeljs.io/docs/en/babel-polyfill
<script | ||
crossOrigin="anonymous" | ||
src="https://unpkg.com/prettier@<%= htmlWebpackPlugin.options.versions.prettier %>/parser-typescript.js" | ||
src="https://cdn.jsdelivr.net/combine/npm/prettier@<%= htmlWebpackPlugin.options.versions.prettier %>/standalone.min.js,npm/prettier@<%= htmlWebpackPlugin.options.versions.prettier %>/parser-babylon.min.js,npm/prettier@<%= htmlWebpackPlugin.options.versions.prettier %>/parser-html.min.js,npm/prettier@<%= htmlWebpackPlugin.options.versions.prettier %>/parser-typescript.min.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of 4 files unminified files from CDN we will require only minified one 🚤
@@ -62,7 +51,8 @@ | |||
|
|||
<script src="https://cdn.jsdelivr.net/npm/@babel/standalone@<%= htmlWebpackPlugin.options.versions.babelStandalone %>/babel.min.js"></script> | |||
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism-tomorrow.css"> | |||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism-tomorrow.min.css"> | |||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/react-vis@<%= htmlWebpackPlugin.options.versions.reactVis %>/dist/style.min.css" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also minified versions
Codecov Report
@@ Coverage Diff @@
## master #1542 +/- ##
==========================================
- Coverage 73.16% 71.82% -1.35%
==========================================
Files 828 829 +1
Lines 6227 6697 +470
Branches 1786 1898 +112
==========================================
+ Hits 4556 4810 +254
- Misses 1666 1882 +216
Partials 5 5
Continue to review full report at Codecov.
|
zIndex: 100, | ||
}} | ||
title={copyable ? 'Copy' : undefined} | ||
> | ||
<div>{label || mode}</div> | ||
{copyable && <div style={{ marginLeft: '5px' }}>{active ? '✔ ' : '⎘'}</div>} | ||
{copyable && <div style={{ marginLeft: '5px' }}>{active ? checkIcon : copyIcon}</div>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…dust-ui/react into fix/ie11-dep # Conflicts: # CHANGELOG.md
Fixes #1534.
Problem
IE11 does not have support of arrow functions while our dependency
css-shorthand-expand
has its usage. And for client there is only one option to fix - compile these dependency withbabel-loader
or any other thing 👎Solution
I used
@pika/pack
to quicky get bundled library, so ourcssExpandShorthand.ts
containscss-shorthand-expand
and all its dependencies in the single and tree-shaken file. As we compile all our files with Babel: arrow functions and any other unsupported things will be compiled properly 🚀