Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Livereload not working after including custom webpack.config.js

$
0
0

@JeffMinsungKim wrote:

After I finished updating typescript file, app-script does proceed a build process, but the result remains the same. Every time I make changes, restarting a server is a very annoying job to do.

For example, when I changed a single line of code from console.log('ABC') to console.log('DEF'), console prints out ABC again.

I have reproduced a sample Ionic 3 project to test livereload without using a custom web pack config file, and everything went great.

It seems like I missed out something in my custom config file. What am I doing wrong here?

webpack.config.js

const path = require('path');
const webpackDefault = require('@ionic/app-scripts/config/webpack.config');
const webpackMerge = require('webpack-merge');

const customConfig = {
  dev: {
    resolve: {
      alias: {
        '@myproject-app': path.resolve('src/app'),
        '@myproject-environments': path.resolve('src/environments'),
        '@myproject-pages': path.resolve('src/pages'),
      }
    }
  },
  prod: {
    resolve: {
      alias: {
        '@myproject-app': path.resolve('src/app'),
        '@myproject-environments': path.resolve('src/environments'),
        '@myproject-pages': path.resolve('src/pages'),
      }
    }
  }
};

module.exports = webpackMerge(webpackDefault, customConfig);

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.7
Cordova Platforms  : android 6.3.0 browser ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2
Node       : v8.9.0
npm        : 5.5.1
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>