Set webpack output path -


i have upgraded webpack 1 2, have given relative output.path absolute path necessary. bundle file goes /static/v4/angular/dist/ in webpack 1 had given output.path: '../static/v4/angular/dist'. how can modify works same previously? here directory structure:

myapp   |   angular      |      config   |   static     |     v4/angular/ // here want files go 

all need convert absolute path. can use path.resolve this.

path.resolve(__dirname, '../static/v4/angular/dist') 

__dirname directory of executed file (your webpack config) , add relative path there. , path.resolve give absolute path of combining them.


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -