How to debug Angular with VSCode?

Tested with Angular 5 / CLI 1.5.5 Install the Chrome Debugger Extension Create the launch.json (inside .vscode folder) Use my launch.json (see below) Create the tasks.json (inside .vscode folder) Use my tasks.json (see below) Press CTRL+SHIFT+B Press F5 launch.json for angular/cli >= 1.3 { “version”: “0.2.0”, “configurations”: [ { “name”: “Launch Chrome”, “type”: “chrome”, “request”: … Read more

Gulp + Webpack or JUST Webpack?

This answer might help. Task Runners (Gulp, Grunt, etc) and Bundlers (Webpack, Browserify). Why use together? …and here’s an example of using webpack from within a gulp task. This goes a step further and assumes that your webpack config is written in es6. var gulp = require(‘gulp’); var webpack = require(‘webpack’); var gutil = require(‘gutil’); … Read more

How to load image files with webpack file-loader

Regarding problem #1 Once you have the file-loader configured in the webpack.config, whenever you use import/require it tests the path against all loaders, and in case there is a match it passes the contents through that loader. In your case, it matched { test: /\.(jpe?g|png|gif|svg)$/i, loader: “file-loader?name=/public/icons/[name].[ext]” } // For newer versions of Webpack it … Read more

Resolving require paths with webpack

Webpack >2.0 See wtk’s answer. Webpack 1.0 A more straightforward way to do this would be to use resolve.root. http://webpack.github.io/docs/configuration.html#resolve-root resolve.root The directory (absolute path) that contains your modules. May also be an array of directories. This setting should be used to add individual directories to the search path. In your case: webpack config var … Read more

How to bundle vendor scripts separately and require them as needed with Webpack?

in my webpack.config.js (Version 1,2,3) file, I have function isExternal(module) { var context = module.context; if (typeof context !== ‘string’) { return false; } return context.indexOf(‘node_modules’) !== -1; } in my plugins array plugins: [ new CommonsChunkPlugin({ name: ‘vendors’, minChunks: function(module) { return isExternal(module); } }), // Other plugins ] Now I have a file … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)