BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c5b7cc54
Commit
c5b7cc54
authored
Jan 19, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use webpack_port file if it exists
parent
0d2ae3e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
development.rb
config/environments/development.rb
+4
-0
webpack.config.js
config/webpack.config.js
+8
-1
No files found.
config/environments/development.rb
View file @
c5b7cc54
Rails
.
application
.
configure
do
Rails
.
application
.
configure
do
WEBPACK_DEV_PORT
=
`cat ../webpack_port 2>/dev/null || echo '3808'`
.
to_i
# Settings specified here will take precedence over those in config/application.rb
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# In the development environment your application's code is reloaded on
...
@@ -24,6 +26,8 @@ Rails.application.configure do
...
@@ -24,6 +26,8 @@ Rails.application.configure do
# Enable webpack dev server
# Enable webpack dev server
config
.
webpack
.
dev_server
.
enabled
=
true
config
.
webpack
.
dev_server
.
enabled
=
true
config
.
webpack
.
dev_server
.
port
=
WEBPACK_DEV_PORT
config
.
webpack
.
dev_server
.
manifest_port
=
WEBPACK_DEV_PORT
# Do not compress assets
# Do not compress assets
config
.
assets
.
compress
=
false
config
.
assets
.
compress
=
false
...
...
config/webpack.config.js
View file @
c5b7cc54
'use strict'
;
'use strict'
;
var
fs
=
require
(
'fs'
);
var
path
=
require
(
'path'
);
var
path
=
require
(
'path'
);
var
webpack
=
require
(
'webpack'
);
var
webpack
=
require
(
'webpack'
);
var
StatsPlugin
=
require
(
'stats-webpack-plugin'
);
var
StatsPlugin
=
require
(
'stats-webpack-plugin'
);
...
@@ -10,7 +11,13 @@ var IS_DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') !== -1;
...
@@ -10,7 +11,13 @@ var IS_DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') !== -1;
var
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'..'
);
var
ROOT_PATH
=
path
.
resolve
(
__dirname
,
'..'
);
// must match config.webpack.dev_server.port
// must match config.webpack.dev_server.port
var
DEV_SERVER_PORT
=
3808
;
var
DEV_SERVER_PORT
;
try
{
DEV_SERVER_PORT
=
parseInt
(
fs
.
readFileSync
(
'../webpack_port'
),
10
);
}
catch
(
e
)
{
DEV_SERVER_PORT
=
3808
;
}
var
config
=
{
var
config
=
{
context
:
path
.
join
(
ROOT_PATH
,
'app/assets/javascripts'
),
context
:
path
.
join
(
ROOT_PATH
,
'app/assets/javascripts'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment