Coder Social home page Coder Social logo

Comments (4)

w4ll3 avatar w4ll3 commented on September 24, 2024

I'm afraid not, you will need a bundler to add the polyfills. You can check the notepad example, run it and check the public/bundle.js, probably is what you're looking for.

from siwe.

awoie avatar awoie commented on September 24, 2024

@safisaleem did the provided solution work for you?

from siwe.

safisaleem avatar safisaleem commented on September 24, 2024

@awoie it did, yes. but not exactly like the example. from the package, all I needed in my template was SiweMessage. so i created a file with these 2 lines:

var siwe = require('siwe');
SiweMessage = siwe.SiweMessage;

and then used webpack to convert that into a bundle. here's my webpack config:

const path = require('path');

module.exports = {
  entry: './my-file.js', //path to above file
  output: {
    path: path.resolve(__dirname, 'public', 'javascripts'),
    filename: 'bundle.js',
  },
};

and finally, imported the created bundle.js file into your template as a script and voila

from siwe.

awoie avatar awoie commented on September 24, 2024

Awesome, thanks. Closing this issue since the issue was solved.

from siwe.

Related Issues (20)

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.