fix: serve public/assets with webpack-dev-server
This commit is contained in:
10
README.md
10
README.md
@@ -69,11 +69,13 @@ This repo contains the core code used in the web app, as well as the Electron-ba
|
||||
**Instructions:**
|
||||
|
||||
1. Clone the repo
|
||||
2. `npm install`
|
||||
3. `cp index.html.sample index.html`
|
||||
4. `npm start`
|
||||
1. `bundle install`
|
||||
1. `npm install`
|
||||
1. `bundle exec rails assets:precompile`
|
||||
1. `cp index.html.sample index.html`
|
||||
1. `npm start`
|
||||
|
||||
Then open your browser to `http://localhost:3000`.
|
||||
Then open your browser to `http://localhost:3001`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"start": "webpack-dev-server --progress --config webpack.dev.js",
|
||||
"watch": "webpack -w --config webpack.dev.js",
|
||||
"bundle": "webpack --config webpack.prod.js",
|
||||
"build": "bundle install && npm install && npm run bundle",
|
||||
"build": "bundle install && npm ci && bundle exec rails assets:precompile && npm run bundle",
|
||||
"submodules": "git submodule update --init --force --remote",
|
||||
"lint": "eslint --fix app/assets/javascripts/**/*.js",
|
||||
"tsc": "tsc --project app/assets/javascripts/tsconfig.json"
|
||||
|
||||
@@ -11,6 +11,10 @@ module.exports = (_env, argv) => {
|
||||
'/extensions': {
|
||||
target: `http://localhost:${port}`,
|
||||
pathRewrite: { '^/extensions': '/public/extensions' }
|
||||
},
|
||||
'/assets': {
|
||||
target: `http://localhost:${port}`,
|
||||
pathRewrite: { '^/assets': '/public/assets' }
|
||||
}
|
||||
},
|
||||
port,
|
||||
|
||||
Reference in New Issue
Block a user