Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
61ca496b
Commit
61ca496b
authored
Oct 19, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize production output and generate sourcemaps
parent
df72d65a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
config/webpack.config.js
config/webpack.config.js
+15
-1
No files found.
config/webpack.config.js
View file @
61ca496b
...
...
@@ -22,6 +22,8 @@ var config = {
filename
:
IS_PRODUCTION
?
'
[name]-[chunkhash].js
'
:
'
[name].js
'
},
devtool
:
'
source-map
'
,
module
:
{
loaders
:
[
{
...
...
@@ -52,7 +54,19 @@ var config = {
}
}
if
(
!
IS_PRODUCTION
)
{
if
(
IS_PRODUCTION
)
{
config
.
plugins
.
push
(
new
webpack
.
NoErrorsPlugin
(),
new
webpack
.
optimize
.
UglifyJsPlugin
({
compress
:
{
warnings
:
false
}
}),
new
webpack
.
DefinePlugin
({
'
process.env
'
:
{
NODE_ENV
:
JSON
.
stringify
(
'
production
'
)
}
}),
new
webpack
.
optimize
.
DedupePlugin
(),
new
webpack
.
optimize
.
OccurrenceOrderPlugin
()
);
}
else
{
config
.
devServer
=
{
port
:
DEV_SERVER_PORT
,
headers
:
{
'
Access-Control-Allow-Origin
'
:
'
*
'
}
...
...
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