Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Javascript


Thread Tools Rate Thread Display Modes
Old 11-13-2016, 09:35 PM   #1
Registered User
Join Date: Nov 2016
Posts: 6
Problem with using webpack as a build tool and simple configuration problems

Previously, I was using Webpack as the build tool. And started working with Grunt due to some issues. It was a simple transition with nothing to worry about. After 1 month of work, I started facing this issue:

I am using multiple views in the form of backbone. In order to save the information and collect (for the future use), I am using the factory function. Previously I was working with Grunt, this was working well but after the conversion, the subviews change event is not executing, I am definite about the firing in the Grunt (checked on my other workstation). I am creating these views inside a big (or general/parent) using a simple iteration of for loop.

for (var index=0;  index<this.dayIds.length;  index++) {
  this.timeSelectorDayViews[index] = new timeSelectorDay({
    el: '#timePickersWrapper',
    data: {
      time: this.model.get(this.dayIds[ index]),
      date: moment(this.model.get('weekStartDate')).add( index, 'd')
This is also a fact that I am not using a classic way to generate the event but trying to create it using concatenate method and making a simple change to the event holder array. The only reason I am doing this. I have to get the unique id from those available HTML tags in the code.

Previously, I was supposing issues with webpack. And supposing the event were not correctly attached. But using those with delegateevent method does improve the solution. This means, there are multiple changes required to use the code with webpack. The next point, I was thinking about view scope rather than holding detachment responsible. So, I tested the view separately, but no improvement. On changing this to click event, the whole code is performing well without any issues. And it is using this function to do the firing.

var myDate = 'click' + ' .input-' +;
I am using webpack driver gulp. In order to create the instance, I am passing the following to the configuration.

  entry: './src/app/client-app/index.js',
  output: {
    path: path.join(__dirname, 'dist/app/js'),
    filename: 'app.bundle.js'
  plugins: [
    new webpack.ProvidePlugin({
      '_': 'lodash'
  module: {
    loaders: [
      {test: /\.js$/, exclude: /node_modules/, loaders: ['babel'] },
I am also facing another javascript problem. I am part of a team, who is responsible for maintaining and updating an NGO website. I am assigned to do some restructuring of information pages. This is a tough job for me, as I can't figure out how to do this. Right now, those pages contain information using simple layout with a single orientation. This lead to fast load and response time but not a responsive design. Everything view is part of a big parent layout. Inside the layout, I am having multiple view elements. And as a result, the vertical length of the page is increased by 4 times and the user has to scroll down the whole page to know about the information. is one of those pages. You can see, at the top is the menu, followed by the map, after that there is parent div, which contains, image, wp-article, ads, ratings and comments with blank space, which does not have any useful purpose ( a clear non-responsiveness issue). So, I have to use javascript, convert this page into a simple example of drag and drop. So, if the website admin decides to make some changes, he just has to drop elements/view on the page.
SungKrumsiek is offline   Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The HOTTEST Social Platform Of Our Time! How To Build Your Following Fast! Baby Bear Making money on the web 1 06-09-2016 07:11 AM
The HOTTEST Social Platform Of Our Time! How To Build Your Following Fast! Baby Bear Post your ad here 0 06-08-2016 11:29 AM
Build custom game for your website in minutes friv General Discussion 3 12-14-2015 03:46 AM
Fully Customized online Greeting Card Designer Tool productdesign12 Graphic Design 0 10-24-2015 03:06 AM
Design your Product with 3D Shoes Designer Tool productdesign12 Graphic Design 0 10-08-2015 12:22 AM

All times are GMT -7. The time now is 10:49 PM.

Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.