Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
ce9fdca5
Commit
ce9fdca5
authored
8 years ago
by
Max
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix webpack config
parent
9317d106
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/webpack.config.dev.js
+5
-1
config/webpack.config.dev.js
with
5 additions
and
1 deletion
+5
-1
config/webpack.config.dev.js
+
5
-
1
View file @
ce9fdca5
...
...
@@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
var
webpack
=
require
(
'
webpack
'
);
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
function
isInDebugMode
()
{
return
process
.
argv
.
some
(
function
(
item
)
{
return
item
.
indexOf
(
'
--debug-template
'
)
>
-
1
});
}
// TODO: hide this behind a flag and eliminate dead code on eject.
// This shouldn't be exposed to the user.
var
isInNodeModules
=
'
node_modules
'
===
path
.
basename
(
path
.
resolve
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
)));
var
relativePath
=
isInNodeModules
?
'
../../..
'
:
'
..
'
;
if
(
process
.
argv
[
2
]
===
'
--debug-template
'
)
{
if
(
isInDebugMode
()
)
{
relativePath
=
'
../template
'
;
}
var
srcPath
=
path
.
resolve
(
__dirname
,
relativePath
,
'
src
'
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets