feat: reduce number of steps needed to get going for local development (#454)

* feat: reduce number of steps to get going for local development

* fix: set default sync server in SNJS

* chore: keep --force in submodules command
This commit is contained in:
Baptiste Grob
2020-09-02 17:37:50 +02:00
committed by GitHub
parent 6a1c10d3f7
commit 57aa942c91
11 changed files with 449 additions and 25 deletions

View File

@@ -1,12 +1,20 @@
const merge = require('webpack-merge');
const config = require('./webpack.config.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = (env, argv) => {
const port = argv.port || 3001;
return merge(config(env, argv), {
mode: 'development',
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
templateParameters: {
env: process.env
},
}),
],
devServer: {
publicPath: '/dist/',
proxy: {
'/extensions': {
target: `http://localhost:${port}`,
@@ -15,7 +23,7 @@ module.exports = (env, argv) => {
'/assets': {
target: `http://localhost:${port}`,
pathRewrite: { '^/assets': '/public/assets' }
}
},
},
port,
}