Comments (8)
@PascalAOMS no index.js
is required, neither are src
files. the downloaded files should be as they are (ES5), otherwise your build process would have to transpile your node_modules
, which is undesirable and unmaintainable, because of the likelihood of library authors using different babel
configs.
all the fields in the package.json
that tell bundlers where to get the file from point to the dist
folder. those dist
files are created in the prepublish hook.
npm
and yarn
are only used to install packages - its likely a problem with your bundler config (browserify, webpack, etc) thats causing the failure to import. without seeing more of your config, its hard to say for sure, but im almost 100% positive this is related to that
from jump.js.
Thank you very much for the explanation.
from jump.js.
@PascalAOMS no problem. feel free to post your webpack/browserify config - id be happy to take a look
from jump.js.
You can find my webpack.config.js
here.
Thanks!
from jump.js.
@PascalAOMS my guess is that something with your directory structure is throwing off webpack and preventing it from finding your node_modules
.
the way you're aliasing vue
looks like its because of a similar problem you had importing it. try adding a root
to your resolve
object, as in the following, and hopefully you wont need aliases (unless those are there for a different reason):
resolve: {
// point this to the root folder of your project
// node_modules should be inside of the folder this points to
root: path.resolve(__dirname, './relative/path'),
alias: {
// your existing aliases might not be needed anymore
// if jump.js works, try removing the vue alias
}
}
let me know if that helps
from jump.js.
I am using Webpack 2. You gave me a good tip with root
though.
The equivalent would be
resolve: {
modules: ['src', 'node_modules']
}
But that does not seem to work either.
from jump.js.
@PascalAOMS im stumped. this is my boilerplate for webpack 2, itll generate a directory for you. using that structure, everything works for me without even specifying the root directory or modules directory 🤕
here's a link to the webpack config (its in the template
folder)
from jump.js.
Using const jump = require('jump.js').default
works as well.
No idea why though. Yea...
from jump.js.
Related Issues (20)
- No module export HOT 3
- It is a nightmare to use this with my angular 2 application using system js for bundling HOT 1
- Sometimes callback executing before scrolling has finished HOT 1
- prevent calling jump() when current jump is not finished
- Is it possible to use Jump to replace the default behavior for the anchors? HOT 1
- Feature Request: Make target optional HOT 1
- Document why tabindex is necessary when a11y: true HOT 4
- Option to prevent anchor from beeing added to the URL? HOT 1
- Error in case of jumping to non-existing target HOT 1
- Bug in Chrome With Small Viewports -- Jump Effect with Flicker and Ignoring Offset HOT 2
- Scrolling Breaks When CSS Has Overflow. HOT 1
- Prevent jumping when position is the same
- MIT Licence not assigned on GH HOT 1
- Can we use GSAP Easings with Jump.js ? HOT 2
- Doesn't work with gulp? HOT 1
- Help needed with angular
- An old scholl version, really.. HOT 2
- Can't scroll back up the page
- Lazy loading images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jump.js.