alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.29k stars 178 forks source link

Missing ./dist/react-fullpage.js on v0.1.20 #297

Closed AbeEstrada closed 2 years ago

AbeEstrada commented 2 years ago

Description

I'm getting this error:

Module not found: Can't resolve '@fullpage/react-fullpage'

Steps to reproduce it

import ReactFullpage from "@fullpage/react-fullpage";

I cloned the repo and the build script doesn't generate a "./dist/react-fullpage.js" file.

Versions

v0.1.20

alvarotrigo commented 2 years ago

Mmm.... It might be related to this change? https://github.com/alvarotrigo/react-fullpage/commit/ea4cd055b6caf876ff0acbafb7f5d8c543936f1b

alvarotrigo commented 2 years ago

As a workaround until we figure this out (any help will be appreciated! :) ) you can do this:

Remove the second merge function from this file.

Then do npm run build and you'll get the JS file you need (react-fullpage.js )in the dist folder.

alvarotrigo commented 2 years ago

@jason-warner any idea what could be the reason? I had to update the webpack.config.build.js to make it build back then, but apparently it's skipping one of the output files now?

AbeEstrada commented 2 years ago

@alvarotrigo the CleanWebpackPlugin is running twice, it removes the recently created react-fullpage.js on the second merge

AbeEstrada commented 2 years ago

Maybe this should fix it?

plugins: [new CleanWebpackPlugin({ cleanStaleWebpackAssets: false })]
alvarotrigo commented 2 years ago

Awesome, that did the trick!

Fixed and merged into a new release 0.1.21.