improve webpack config
This commit is contained in:
@@ -4,21 +4,13 @@ import webpack from 'webpack'
|
||||
import httpProxyMiddleware from 'http-proxy-middleware'
|
||||
import webpackDevMiddleware from 'webpack-dev-middleware'
|
||||
import webpackHotMiddleware from 'webpack-hot-middleware'
|
||||
import config from './webpack.config'
|
||||
import config from './webpack.examples.config'
|
||||
import { sassImport } from './utilities'
|
||||
import { srcPath, sassImportPath } from './paths'
|
||||
|
||||
const bundler = webpack(config)
|
||||
const middlewares = []
|
||||
|
||||
middlewares.push(httpProxyMiddleware('/api', {
|
||||
target: 'http://local.app.scrumpy.io/api',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '',
|
||||
},
|
||||
}))
|
||||
|
||||
// add webpack stuff
|
||||
middlewares.push(webpackDevMiddleware(bundler, {
|
||||
publicPath: config.output.publicPath,
|
||||
@@ -32,7 +24,7 @@ middlewares.push(webpackDevMiddleware(bundler, {
|
||||
middlewares.push(webpackHotMiddleware(bundler))
|
||||
|
||||
// start browsersync
|
||||
const url = 'http://local.app.scrumpy.io'
|
||||
const url = 'http://localhost'
|
||||
const bs = browserSync.create()
|
||||
const server = bs.init({
|
||||
server: {
|
||||
|
||||
Reference in New Issue
Block a user