Merge pull request #433 from standardnotes/fix-ionicons-path
fix: ionicons not found on webpack dev server
This commit is contained in:
@@ -9,7 +9,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --progress",
|
"start": "webpack-dev-server --progress",
|
||||||
"bundle": "webpack --mode production",
|
"bundle": "webpack --mode production",
|
||||||
"build": "bundle install && npm ci && bundle exec rails assets:precompile && npm run bundle",
|
"precompile:assets": "bundle exec rails assets:precompile",
|
||||||
|
"postinstall": "npm run precompile:assets",
|
||||||
|
"build": "bundle install && npm ci && npm run precompile:assets && npm run bundle",
|
||||||
"submodules": "git submodule update --init --force --remote",
|
"submodules": "git submodule update --init --force --remote",
|
||||||
"test": "karma start karma.conf.js --single-run",
|
"test": "karma start karma.conf.js --single-run",
|
||||||
"lint": "eslint --fix app/assets/javascripts/**/*.js"
|
"lint": "eslint --fix app/assets/javascripts/**/*.js"
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ const path = require('path');
|
|||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
|
|
||||||
|
const port = 3000;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: './app/assets/javascripts/index.js',
|
entry: './app/assets/javascripts/index.js',
|
||||||
output: {
|
output: {
|
||||||
@@ -10,11 +12,15 @@ module.exports = {
|
|||||||
devServer: {
|
devServer: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/extensions': {
|
'/extensions': {
|
||||||
target: 'http://localhost:3000',
|
target: `http://localhost:${port}`,
|
||||||
pathRewrite: { '^/extensions': '/public/extensions' }
|
pathRewrite: { '^/extensions': '/public/extensions' }
|
||||||
|
},
|
||||||
|
'/assets': {
|
||||||
|
target: `http://localhost:${port}`,
|
||||||
|
pathRewrite: { '^/assets': '/public/assets' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
port: 3000
|
port
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
|
|||||||
Reference in New Issue
Block a user