youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Added support for importing via webpack #462

Closed MirazMac closed 3 years ago

MirazMac commented 3 years ago

Currently it's not possible to import the library within build systems like WebPack.

For example, at the moment you can't do this:

import { spf } from 'spf';

It will throw an unresolvable package error. It can be fixed just by adding just these two lines in the package.json

  "main": "dist/spf.js",
  "module": "dist/spf.js",

Now, WebPack will be able to resolve the package when imported. Yes, you can always define custom resolvers in WebPack, but it's still pretty convenient to have by default.

googlebot commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

MirazMac commented 3 years ago

@googlebot I signed it!

googlebot commented 3 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

google-cla[bot] commented 3 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.