Skip to content

Commit

Permalink
set publicPath separately
Browse files Browse the repository at this point in the history
  • Loading branch information
jaels committed Feb 23, 2018
1 parent d6b4edb commit 1da13af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ vis/stylesheets/*.css
*.map
dist/
.idea/
config.js
4 changes: 4 additions & 0 deletions config.example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

module.exports = {
publicPath : "http://localhost/headstart/dist"
};
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const webpack = require('webpack');
const merge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const config = require('./config.example.js');

const TARGET = process.env.npm_lifecycle_event;

Expand All @@ -13,7 +14,7 @@ const common = {
output: {
path: path.resolve(__dirname, "dist"),
//dev: specify a full path including protocol, production: specify full path excluding protocol
publicPath: ".",
publicPath: config.publicPath,
filename: 'headstart.js',
libraryTarget: 'var',
library: 'headstart'
Expand Down

0 comments on commit 1da13af

Please sign in to comment.