skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

Require babel plugin to transform imports #164

Open ashvin777 opened 3 years ago

ashvin777 commented 3 years ago

I am looking for some babel plugin which can transform the import statement to prefix the skypck cdn path by default. This is actually needed to auto transpile JS module imports in JSitor.com(An online JS editor)

// Basically the below code:

import * as React from 'react';

// Transpile to below using that plugin:


import * as React from 'https://cdn.skypack.dev/react';
matthewp commented 3 years ago

Not sure I follow, are you saying you'd prefer if skypack didn't rewrite the import specifier?

ashvin777 commented 3 years ago

Hi @matthewp , Rephrased the issue description. Please read again 🙂