Giter Club home page Giter Club logo

Comments (5)

fxkr avatar fxkr commented on August 13, 2024 1

I have published version 1.0.4 that contains the following fixes relevant for you:

  1. No more experimental class properties syntax - you should not need plugin-proposal-class-properties now
  2. No more shebang - you should not need shebang-loader now
  3. Fixed import issue I mentioned

Can you please comment if everything works for you now?

Thank you!

from link2aws.github.io.

vladblaj avatar vladblaj commented on August 13, 2024 1

It works! Thank you for your help and for the quick response.
All the best,
Vlad

from link2aws.github.io.

fxkr avatar fxkr commented on August 13, 2024

Thank you for your bug report, and my apologies that you are experiencing these issues.

shebang issue

In your opinion, is using using shebang-loader an acceptable workaround?

I believe there are two options:

  1. Document the need to use shebang-loader, and how to do it. Downside: requires user to use additional plugin. However: installing the plugin is not hard.
  2. Remove the shebang for the file. Downside: breaks the "single executable .js file" use case. However: could still use it as node link2aws.js, and might be able to retain the easy CLI access by offering a separate link2aws binary that uses the library.

Since neither one of the approaches seems clearly better than the other, I could be easily convinced one way or another. If you have an opinion, please let me know.

class fields issue

When I wrote the original code, apparently I mistakenly thought that class properties were already in the standard. The only good solution is to not rely on class properties. I intend to develop a fix and release a new version with it tonight.

There is actually a loader that would fix this, but a) it is experimental, and b) it only affects the project importing it, not its libraries, so using this is not a workaround for you.

import of link2aws

Could you please share the line of code that you have used to import link2aws.js in your CRA? It appears to me that the way it currently is (code in link2aws.js and not index.js), import might actually fail. So I am surprised you did not mention this issue. I would like to come up with a fix for this, however I would like to be sure I can test it the way you did as well to ensure I will not break your app with any change that I make.

from link2aws.github.io.

vladblaj avatar vladblaj commented on August 13, 2024

Thank you very much for the quick reply. Everything works as intended without the need of additional babel plugins.
As for the import, with the current version it works like this:
import { ARN } from "link2aws/link2aws.js";
Maybe adding an index.js would make the import prettier.

from link2aws.github.io.

fxkr avatar fxkr commented on August 13, 2024

That was the import issue I mentioned and should already be fixed in that release (by setting "main": "link2aws.js" in package.json instead of creating index.js - for whatever reason the field was referring to a non-existing file. #10).

Did you try import { ARN } from "link2aws" with that new release? I created a test CRA and it works there.

from link2aws.github.io.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.