Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-weichat
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj_app
saas-weichat
Commits
5322492e
Commit
5322492e
authored
Jun 09, 2022
by
Jay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: add webpack.dev.config
parent
94dbfcf5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
1 deletions
+57
-1
.gitignore
+1
-1
build/webpack.dev.config.js
+56
-0
No files found.
.gitignore
View file @
5322492e
...
@@ -4,6 +4,6 @@ yarn.lock
...
@@ -4,6 +4,6 @@ yarn.lock
.DS_Store
.DS_Store
/node_modules/react-sticky/package.json
/node_modules/react-sticky/package.json
src/.DS_Store
src/.DS_Store
webpack.dev.config.js
#
webpack.dev.config.js
packge-lock.json
packge-lock.json
.cache
.cache
build/webpack.dev.config.js
0 → 100644
View file @
5322492e
/**
* anth: 陈万军
* time: 2020-05-1
* 集成功能: 开发环境
* */
var
webpack
=
require
(
"webpack"
);
var
path
=
require
(
"path"
);
const
HtmlWebpackPlugin
=
require
(
"html-webpack-plugin"
);
var
config
=
require
(
"./webpack.base.config.js"
);
const
apiConfig
=
require
(
"../src/services/baseUrl.js"
);
const
AddAssetHtmlPlugin
=
require
(
"add-asset-html-webpack-plugin"
);
var
CaseSensitivePathsPlugin
=
require
(
"case-sensitive-paths-webpack-plugin"
);
var
_
=
require
(
"lodash"
);
const
TARGET
=
process
.
env
.
npm_lifecycle_event
;
const
commonConfig
=
{
plugins
:
[
new
CaseSensitivePathsPlugin
(),
new
webpack
.
HotModuleReplacementPlugin
(),
new
webpack
.
DefinePlugin
({
PRODUCTION
:
JSON
.
stringify
(
true
),
VERSION
:
JSON
.
stringify
(
"5fa3b9"
),
routerMode
:
JSON
.
stringify
(
"hash"
),
API_CONFIG
:
JSON
.
stringify
(
apiConfig
),
BUILD_VERSION
:
JSON
.
stringify
(
new
Date
().
toString
()),
}),
new
HtmlWebpackPlugin
({
template
:
"template/index.html"
,
inject
:
"body"
,
filename
:
"index.html"
,
}),
// new AddAssetHtmlPlugin({
// filepath: path.resolve(__dirname, '../dist/lib/*.js'),
// }),
new
AddAssetHtmlPlugin
([
// { filepath: path.resolve(__dirname, '../libs/*.js') },
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/jweixin.1.4.0.js"
)
},
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/hd.js"
)
},
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/variable.js"
)
},
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/js-rsa.js"
)
},
// { filepath: path.resolve(__dirname, '../jslibs/*.css') },
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/fastclick.1.0.6.js"
)
},
// { filepath: path.resolve(__dirname, '../jslibs/intl/zh.js') },
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/plupload-2.1.2/js/*.js"
)
},
{
filepath
:
path
.
resolve
(
__dirname
,
"../jslibs/tinymce/5.2.0/tinymce.min.js"
),
},
]),
],
};
let
mergedConfig
=
commonConfig
;
mergedConfig
=
_
.
merge
(
config
,
commonConfig
);
module
.
exports
=
mergedConfig
;
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