|
Notices |
|
Thread Tools | Rate Thread | Display Modes |
11-13-2016, 10: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. Code:
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') } }).render(); } 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. Code:
var myDate = 'click' + ' .input-' + this.options.data.formattedDate; Code:
{ 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'] }, ] } } |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 04: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 |