File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 100100 "PrettyCSS" : " ^0.3.13" ,
101101 "ajv" : " ^5.2.2" ,
102102 "array-to-sentence" : " ^1.1.0" ,
103- "base64-js" : " ^1.0.2" ,
104103 "bowser" : " ^1.4.5" ,
105104 "brace" : " ^0.10.0" ,
106105 "bugsnag-js" : " ^3.0.1" ,
147146 "rxjs" : " ^5.0.2" ,
148147 "slowparse" : " ^1.1.4" ,
149148 "stylelint" : " ^8.0.0" ,
150- "text-encoding" : " ^0.6.0" ,
151149 "uuid" : " ^3.1.0" ,
152150 "void-elements" : " ^3.1.0"
153151 },
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,13 +4,10 @@ import flatMap from 'lodash/flatMap';
44import isEmpty from 'lodash/isEmpty' ;
55import pick from 'lodash/pick' ;
66import uniq from 'lodash/uniq' ;
7- import base64 from 'base64-js' ;
8- import { TextEncoder } from 'text-encoding' ;
97import loopBreaker from 'loop-breaker' ;
108import libraries from '../config/libraries' ;
119import previewFrameLibraries from '../config/previewFrameLibraries' ;
1210
13- const textEncoder = new TextEncoder ( 'utf-8' ) ;
1411const parser = new DOMParser ( ) ;
1512
1613const sourceDelimiter = '/*__POPCODESTART__*/' ;
@@ -204,12 +201,9 @@ class PreviewGenerator {
204201 }
205202
206203 _attachCssLibrary ( css ) {
207- const linkTag = this . previewDocument . createElement ( 'link' ) ;
208- linkTag . rel = 'stylesheet' ;
209-
210- const base64encoded = base64 . fromByteArray ( textEncoder . encode ( css ) ) ;
211- linkTag . href = `data:text/css;charset=utf-8;base64,${ base64encoded } ` ;
212- this . _previewHead . appendChild ( linkTag ) ;
204+ const styleTag = this . previewDocument . createElement ( 'style' ) ;
205+ styleTag . textContent = String ( css ) ;
206+ this . _previewHead . appendChild ( styleTag ) ;
213207 }
214208
215209 _attachJavascriptLibrary ( javascript ) {
Original file line number Diff line number Diff line change @@ -8019,7 +8019,7 @@ tempfile@^1.1.1:
80198019 os-tmpdir "^1.0.0"
80208020 uuid "^2.0.1"
80218021
8022- text-encoding@0.6.4, text-encoding@^0.6.0 :
8022+ text-encoding@0.6.4 :
80238023 version "0.6.4"
80248024 resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
80258025
You can’t perform that action at this time.
0 commit comments