Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pvk-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
amiv
pvk-tool
Commits
69687bfa
Commit
69687bfa
authored
Dec 02, 2017
by
Alexander Dietmüller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Frontend: Update package information and webpack config.
parent
d0108f0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
97 deletions
+89
-97
Frontend/package.json
Frontend/package.json
+12
-9
Frontend/webpack.config.js
Frontend/webpack.config.js
+53
-36
Frontend/webpack.config.prod.js
Frontend/webpack.config.prod.js
+24
-52
No files found.
Frontend/package.json
View file @
69687bfa
...
...
@@ -13,20 +13,23 @@
},
"author"
:
"AMIV IT team"
,
"dependencies"
:
{
"babel"
:
"^6.23.0"
,
"babel-core"
:
"^6.26.0"
,
"babel-loader"
:
"^7.1.2"
,
"babel-preset-env"
:
"^1.6.1"
,
"compression-webpack-plugin"
:
"^1.0.1"
,
"local-storage"
:
"^1.4.2"
,
"mithril"
:
"^1.1.5"
,
"uglifyjs-webpack-plugin"
:
"^1.0.1"
,
"webpack"
:
"^3.8.1"
"mithril"
:
"^1.1.5"
},
"devDependencies"
:
{
"eslint"
:
"^4.10.0"
,
"eslint-config-airbnb-base"
:
"^12.1.0"
,
"eslint-plugin-import"
:
"^2.8.0"
,
"webpack-dev-server"
:
"^2.9.3"
"webpack-dev-server"
:
"^2.9.3"
,
"babel-core"
:
"^6.26.0"
,
"babel-cli"
:
"^6.26.0"
,
"babel-loader"
:
"^7.1.2"
,
"babel-preset-env"
:
"^1.6.1"
,
"compression-webpack-plugin"
:
"^1.0.1"
,
"file-loader"
:
"^1.1.5"
,
"css-loader"
:
"^0.28.7"
,
"style-loader"
:
"^0.19.0"
,
"uglifyjs-webpack-plugin"
:
"^1.0.1"
,
"webpack"
:
"^3.8.1"
}
}
Frontend/webpack.config.js
View file @
69687bfa
var
webpack
=
require
(
'
webpack
'
);
var
config
=
{
context
:
__dirname
+
'
/src
'
,
// `__dirname` is root of project and `src` is source
entry
:
'
./index.js
'
,
output
:
{
path
:
__dirname
+
'
/dist
'
,
// `dist` is the destination
filename
:
'
bundle.js
'
},
//To run development server
devServer
:
{
contentBase
:
__dirname
,
publicPath
:
'
/dist
'
,
compress
:
true
,
port
:
9000
,
hot
:
true
,
index
:
"
index.html
"
},
module
:
{
rules
:
[
{
test
:
/
\.
js$/
,
// Check for all js files
exclude
:
/node_modules/
,
use
:
[{
loader
:
'
babel-loader
'
,
options
:
{
presets
:
[
'
env
'
]
}
}]
}
]
},
devtool
:
"
eval-source-map
"
// Default development sourcemap
const
publicPath
=
'
/dist
'
;
const
config
=
{
context
:
`
${
__dirname
}
/src`
,
// `__dirname` is root of project
entry
:
'
./index.js
'
,
output
:
{
path
:
`
${
__dirname
}
/dist`
,
// `dist` is the destination
filename
:
'
bundle.js
'
,
},
// To run development server
devServer
:
{
contentBase
:
__dirname
,
publicPath
,
compress
:
true
,
port
:
9000
,
hot
:
true
,
index
:
'
index.html
'
,
},
module
:
{
rules
:
[
{
test
:
/
\.
js$/
,
// Check for all js files
exclude
:
/node_modules/
,
use
:
[{
loader
:
'
babel-loader
'
,
options
:
{
presets
:
[
'
env
'
]
},
}],
},
{
test
:
/
\.(
png|jpe
?
g|gif|svg
)
$/
,
use
:
[
{
loader
:
'
file-loader
'
,
options
:
{
useRelativePath
:
true
,
publicPath
,
},
},
],
},
{
test
:
/
\.
css$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
],
},
],
},
devtool
:
'
eval-source-map
'
,
// Default development sourcemap
};
module
.
exports
=
config
;
Frontend/webpack.config.prod.js
View file @
69687bfa
var
webpack
=
require
(
'
webpack
'
);
var
CompressionPlugin
=
require
(
'
compression-webpack-plugin
'
);
var
config
=
{
context
:
__dirname
+
'
/src
'
,
// `__dirname` is root of project and `src` is source
entry
:
'
./index.js
'
,
output
:
{
path
:
__dirname
+
'
/dist
'
,
// `dist` is the destination
filename
:
'
bundle.js
'
},
//To run development server
devServer
:
{
contentBase
:
__dirname
,
publicPath
:
'
/dist
'
,
compress
:
true
,
port
:
9000
,
hot
:
true
,
index
:
"
index.html
"
},
module
:
{
rules
:
[
{
test
:
/
\.
js$/
,
// Check for all js files
exclude
:
/node_modules/
,
use
:
[{
loader
:
'
babel-loader
'
,
options
:
{
presets
:
[
'
env
'
]
}
}]
}
]
},
plugins
:
[
new
webpack
.
optimize
.
UglifyJsPlugin
(),
new
webpack
.
optimize
.
AggressiveMergingPlugin
(),
new
CompressionPlugin
({
asset
:
"
[path].gz[query]
"
,
algorithm
:
"
gzip
"
,
test
:
/
\.
js$|
\.
css$|
\.
html$/
,
threshold
:
10240
,
minRatio
:
0.8
})
],
devtool
:
""
// No source map for production build
};
module
.
exports
=
config
;
\ No newline at end of file
const
webpack
=
require
(
'
webpack
'
);
const
CompressionPlugin
=
require
(
'
compression-webpack-plugin
'
);
// Start with dev config
const
config
=
require
(
'
./webpack.config.js
'
);
// Remove development server and code map
config
.
devServer
=
undefined
;
config
.
devtool
=
''
;
// Add optimization plugins
config
.
plugins
=
[
new
webpack
.
optimize
.
UglifyJsPlugin
(),
new
webpack
.
optimize
.
AggressiveMergingPlugin
(),
new
CompressionPlugin
({
asset
:
'
[path].gz[query]
'
,
algorithm
:
'
gzip
'
,
test
:
/
\.
js$|
\.
css$|
\.
html$/
,
threshold
:
10240
,
minRatio
:
0.8
,
}),
];
module
.
exports
=
config
;
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