Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9ce2a4e5
authored
May 29, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add webpack.config
1 parent
ff6f0371
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
config/webpack.config.js
dist/index.html
package-lock.json
package.json
config/webpack.config.js
View file @
9ce2a4e
...
@@ -2,6 +2,7 @@ var path = require('path')
...
@@ -2,6 +2,7 @@ var path = require('path')
var
webpack
=
require
(
'webpack'
)
var
webpack
=
require
(
'webpack'
)
const
{
port
}
=
require
(
"../package"
);
const
{
port
}
=
require
(
"../package"
);
const
htmlWebpackPlugin
=
require
(
'html-webpack-plugin'
);
const
MiniCssExtractPlugin
=
require
(
"mini-css-extract-plugin"
);
const
MiniCssExtractPlugin
=
require
(
"mini-css-extract-plugin"
);
const
OptimizeCSSAssetsPlugin
=
require
(
"optimize-css-assets-webpack-plugin"
);
const
OptimizeCSSAssetsPlugin
=
require
(
"optimize-css-assets-webpack-plugin"
);
const
UglifyJsPlugin
=
require
(
'uglifyjs-webpack-plugin'
);
const
UglifyJsPlugin
=
require
(
'uglifyjs-webpack-plugin'
);
...
@@ -13,8 +14,8 @@ const templateFunction = require('./sprite')
...
@@ -13,8 +14,8 @@ const templateFunction = require('./sprite')
const
BundleAnalyzerPlugin
=
require
(
'webpack-bundle-analyzer'
).
BundleAnalyzerPlugin
;
const
BundleAnalyzerPlugin
=
require
(
'webpack-bundle-analyzer'
).
BundleAnalyzerPlugin
;
//localhost:10500
//localhost:10500
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'
/ots/vue/build
/'
;
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'
.
/'
;
const
resourcesPath
=
IS_DEV_MODE
?
`//localhost:
${
port
}
`
:
'http://e
shield-perm.test.glsx.com.cn
'
;
const
resourcesPath
=
IS_DEV_MODE
?
`//localhost:
${
port
}
`
:
'http://e
-shield-old.frontend.test.glsx.com.cn/
'
;
module
.
exports
=
{
module
.
exports
=
{
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
...
@@ -116,7 +117,11 @@ module.exports = {
...
@@ -116,7 +117,11 @@ module.exports = {
],
],
},
},
plugins
:
[
plugins
:
[
new
htmlWebpackPlugin
({
chunks
:
[
'main'
],
filename
:
'index.html'
,
template
:
path
.
resolve
(
__dirname
,
`../dist/index.html`
)
}),
new
webpack
.
HotModuleReplacementPlugin
(),
new
webpack
.
HotModuleReplacementPlugin
(),
/*new SpritesmithPlugin({
/*new SpritesmithPlugin({
src: {
src: {
...
...
dist/index.html
View file @
9ce2a4e
...
@@ -2,15 +2,16 @@
...
@@ -2,15 +2,16 @@
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
v-simple
</title>
<title>
试乘试驾
</title>
</head>
</head>
<!-- <link rel="stylesheet" href="css/main.5163fe9d199e8bbd0277.min.css"> -->
<body>
<body>
<div
id=
"glsx-sub-system"
></div>
<div
id=
"glsx-sub-system"
></div>
<script
src=
"lib/pace.min.js"
></script>
<script
src=
"lib/pace.min.js"
></script>
<script
src=
"lib/vue.min.js"
></script>
<script
src=
"lib/vue.min.js"
></script>
<script
src=
"lib/element-ui.js"
></script>
<script
src=
"lib/element-ui.js"
></script>
<script
src=
"lib/moment.min.js"
></script>
<script
src=
"lib/moment.min.js"
></script>
<
script
src=
"js/main.bundle.js"
></script
>
<
!-- <script src="js/main.5163fe9d199e8bbd0277.bundle.js"></script> --
>
<!-- <script src="js/runtime.bundle.js"></script> -->
<!-- <script src="js/runtime.bundle.js"></script> -->
</body>
</body>
</html>
</html>
package-lock.json
View file @
9ce2a4e
This diff is collapsed.
Click to expand it.
package.json
View file @
9ce2a4e
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
"extract-text-webpack-plugin"
:
"^3.0.2"
,
"extract-text-webpack-plugin"
:
"^3.0.2"
,
"file-loader"
:
"^1.1.4"
,
"file-loader"
:
"^1.1.4"
,
"hard-source-webpack-plugin"
:
"^0.6.4"
,
"hard-source-webpack-plugin"
:
"^0.6.4"
,
"html-webpack-plugin"
:
"^3.2.0"
,
"http-proxy-middleware"
:
"^0.18.0"
,
"http-proxy-middleware"
:
"^0.18.0"
,
"mini-css-extract-plugin"
:
"^0.4.0"
,
"mini-css-extract-plugin"
:
"^0.4.0"
,
"node-sass"
:
"^4.14.1"
,
"node-sass"
:
"^4.14.1"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment