@codesandbox/sandpack-client
Version:
<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />
1 lines • 3.15 kB
JavaScript
(this.csbJsonP=this.csbJsonP||[]).push([["postcss-compiler"],{"../../standalone-packages/codesandbox-browserfs/dist/shims/buffer.js":function(s,e){s.exports=BrowserFS.BFSRequire("buffer")},"./node_modules/postcss-url/src/type sync recursive ^\\.\\/.*$":function(s,e,n){var o={"./copy":"./node_modules/postcss-url/src/type/copy.js","./copy.js":"./node_modules/postcss-url/src/type/copy.js","./custom":"./node_modules/postcss-url/src/type/custom.js","./custom.js":"./node_modules/postcss-url/src/type/custom.js","./inline":"./node_modules/postcss-url/src/type/inline.js","./inline.js":"./node_modules/postcss-url/src/type/inline.js","./rebase":"./node_modules/postcss-url/src/type/rebase.js","./rebase.js":"./node_modules/postcss-url/src/type/rebase.js"};function t(s){var e=r(s);return n(e)}function r(s){if(!n.o(o,s)){var e=new Error("Cannot find module '"+s+"'");throw e.code="MODULE_NOT_FOUND",e}return o[s]}t.keys=function(){return Object.keys(o)},t.resolve=r,s.exports=t,t.id="./node_modules/postcss-url/src/type sync recursive ^\\.\\/.*$"},"./src/sandbox/eval/transpilers/postcss/loader.ts":function(s,e,n){"use strict";n.r(e);var o=n("../../node_modules/@babel/runtime/helpers/asyncToGenerator.js"),t=n.n(o),r=n("./node_modules/postcss/lib/postcss.js"),c=n.n(r),u=n("../../node_modules/postcss-import/index.js"),i=n.n(u),l=n("./node_modules/postcss-url/src/index.js"),d=n.n(l),p=n("../../node_modules/path-browserify/index.js"),a=n("./src/sandbox/eval/utils/is-dependency-path.ts");function y(s,e,n){return f.apply(this,arguments)}function f(){return(f=t()((function*(s,e,n){if(Object(a.a)(e)){try{const n=yield s.resolveTranspiledModuleAsync(Object(p.join)(e,"package.json")),o=JSON.parse(n.module.code);if(o.style){const n=Object(p.join)(e,o.style);return s.resolveTranspiledModuleAsync(n)}}catch(s){}return s.resolveTranspiledModuleAsync(e)}const o="/"===e.charAt(0)?e:Object(p.join)(n,e);return s.resolveTranspiledModuleAsync(o)}))).apply(this,arguments)}function m(){return(m=t()((function*(s,e){const n=[i()({resolve:(r=t()((function*(s,n){try{return(yield y(e,s,n)).module.path}catch(s){return null}})),function(s,e){return r.apply(this,arguments)}),load:(o=t()((function*(s){return(yield e.resolveTranspiledModuleAsync(s)).module.code})),function(s){return o.apply(this,arguments)})}),d()({url:"rebase"})];var o,r;const u={to:e.path,from:e.path,map:{inline:!0,annotation:!0}},l=yield c()(n).process(null===s?void 0:s,u);if(l.messages){const s=l.messages;yield Promise.all(s.map(function(){var s=t()((function*(s){"dependency"===s.type&&(yield e.addDependency(s.file))}));return function(e){return s.apply(this,arguments)}}()))}const p=l.map&&l.map.toJSON();return{transpiledCode:l.css,sourceMap:p}}))).apply(this,arguments)}e.default=function(s,e){return m.apply(this,arguments)}},"./src/sandbox/eval/utils/is-dependency-path.ts":function(s,e,n){"use strict";n.d(e,"a",(function(){return o}));const o=s=>/^(\w|@\w|@-)/.test(s)},1:function(s,e){},11:function(s,e){},12:function(s,e){},13:function(s,e){},14:function(s,e){},15:function(s,e){},16:function(s,e){},17:function(s,e){},18:function(s,e){},19:function(s,e){},2:function(s,e){}}]);