Giter Club home page Giter Club logo

Comments (12)

almadsen avatar almadsen commented on May 27, 2024 8

Plus one for this. I'm trying to use this with react, won't work, getting lots of web pack related errors.

from moment-holiday.

AndrewLane avatar AndrewLane commented on May 27, 2024 4

Seeing this as well...

from moment-holiday.

thabelo avatar thabelo commented on May 27, 2024 3

Hey, this seems to be a huge problem for us using react can you please show us how to fix this. Thanks

from moment-holiday.

kgrosvenor avatar kgrosvenor commented on May 27, 2024 2

@Anetk we don't really want to modify node_modules as most of the time we delete this before we commit js projects

from moment-holiday.

joeldenning avatar joeldenning commented on May 27, 2024 2

I have created a fork that is usable via webpack: https://github.com/joeldenning/moment-holiday.

Installation:

npm install --save https://github.com/joeldenning/moment-holiday\#1.5.2-webpack.0

from moment-holiday.

alex996 avatar alex996 commented on May 27, 2024

Tried import 'moment-holiday', it seems to work sparingly, depending on the webpack config. Any clues?

from moment-holiday.

maxkohl88 avatar maxkohl88 commented on May 27, 2024

Running into this too. Great library, but can't use it due to incompatibility with Webpack.

from moment-holiday.

natefoundry avatar natefoundry commented on May 27, 2024

Also ran into this trying to use in React App.

Is there a workaround?

from moment-holiday.

kgrosvenor avatar kgrosvenor commented on May 27, 2024

Cant import

from moment-holiday.

anonet1 avatar anonet1 commented on May 27, 2024

Workaround is to go to node-modules (moment-holiday folder, file:moment-holiday.min.js) and replace:
“undefined”==typeof require||nul===require||require.amd?this.moment:require(“moment”)

with this line:

require("moment")

from moment-holiday.

alex996 avatar alex996 commented on May 27, 2024

@kgrosvenor Fork the .min file to your project then, so you can fix the requires there.

from moment-holiday.

jaketrimble avatar jaketrimble commented on May 27, 2024

@joeldenning thanks for the fork! Also you may want to update your documentation to:

yarn add joeldenning/moment-holiday\#1.5.2-webpack.0

per yarnpkg/yarn#2083 (comment)

Cheers!

from moment-holiday.

Related Issues (12)

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.