-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It don't support with weback #268
Comments
Can you paste your webpack config? It works quite well for me |
Hi, @zhangbg . module: {
loaders: [
{ test: require.resolve("jquery"), loader: "expose?$!expose?jQuery" },
]
} |
It's probably more sensible to use the ProvidePlugin
|
@diega, what about for slimscroll? Do you have the webpack version of that? |
@tylerjgarland Could you elaborate your meaning? With that |
Sorry for being unclear. I have my jQuery defined and working in webpack
but I'm not sure how to include slimscroll in webpack. If you are saying
include it as a normal script tag I can do that as well. I was just curious
if there's a way to configure it via webpack.
…On Mon, Mar 27, 2017, 11:09 PM Timo Sand ***@***.***> wrote:
@tylerjgarland <https://github.com/tylerjgarland> Could you elaborate
your meaning? With that ProvidePlugin you should be able to use
slimscroll as a normal dependency
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABO2MuGYn4fMM3lGbBpXujVgWHjifuOKks5rqKQrgaJpZM4Kg2mh>
.
|
The application I was working on simply used |
Alright, thanks for your time.
…On Mon, Mar 27, 2017, 11:29 PM Timo Sand ***@***.***> wrote:
The application I was working on simply used import slimscroll from
'slimScroll' in the JS script which handled the initialization
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABO2MixLaGLAGHNlSZB718Njxi8sGtlzks5rqKjhgaJpZM4Kg2mh>
.
|
The reason that it doesn't support Webpack is that it has jquery under "Dependencies", and it should be "PeerDependencies". Webpack then instantiate a new jquery object just for jQuery-slimScroll. The jquery of our project ends with no .slimscroll function. Please update package.json! It requires a major version bump, because it forces projects that uses jQuery-slimScroll to have jquery dependencie declared on package.json. @rochal , can you do it for us? By the way, thanks for slimScroll! =) |
I made a pull request: #320 |
It don't support with weback, just because the variables in the code is global object.
The text was updated successfully, but these errors were encountered: