Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
7 years ago
Commit
0c114637c669f22b32352badd3bb875f5512c9f4
1 parent
934d9e51
rm happypack
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
36 deletions
package.json
public/build/webpack.base.config.js
public/build/webpack.sw.config.js
package.json
View file @
0c11463
...
...
@@ -106,7 +106,6 @@
"extract-text-webpack-plugin"
:
"^4.0.0-beta.0"
,
"friendly-errors-webpack-plugin"
:
"^1.7.0"
,
"handlebars-loader"
:
"^1.7.0"
,
"happypack"
:
"^5.0.0-beta.3"
,
"husky"
:
"^0.14.3"
,
"intersection-observer"
:
"^0.5.0"
,
"jquery-lazyload"
:
"^1.9.7"
,
...
...
public/build/webpack.base.config.js
View file @
0c11463
...
...
@@ -6,19 +6,13 @@
'use strict'
;
const
os
=
require
(
'os'
);
const
path
=
require
(
'path'
);
const
shelljs
=
require
(
'shelljs'
);
const
_
=
require
(
'lodash'
);
const
webpack
=
require
(
'webpack'
);
const
HappyPack
=
require
(
'happypack'
);
const
{
cssLoader
,
hbsLoader
}
=
require
(
'./utils.js'
);
const
postcssConfig
=
require
(
'./postcss.config.js'
);
const
happyThreadPool
=
HappyPack
.
ThreadPool
({
// eslint-disable-line
size
:
os
.
cpus
().
length
});
const
getEntries
=
()
=>
{
const
entries
=
{
...
...
@@ -83,16 +77,14 @@ module.exports = (env) => {
test
:
/
\.
js$/
,
exclude
:
[
/node_modules/
],
use
:
[{
loader
:
'
happypack/loader?id=js
'
loader
:
'
babel-loader
'
}]
},
{
test
:
/
\.
css$/
,
use
:
cssLoader
(
env
,
'css'
)
},
{
test
:
/
\.
hbs$/
,
use
:
[{
loader
:
'happypack/loader?id=hbs'
}]
use
:
[
hbsLoader
]
}]
},
resolve
:
{
...
...
@@ -138,21 +130,6 @@ module.exports = (env) => {
maxAssetSize
:
512000
},
plugins
:
[
new
HappyPack
({
id
:
'js'
,
threadPool
:
happyThreadPool
,
loaders
:
[
'babel-loader'
],
}),
new
HappyPack
({
id
:
'hbs'
,
threadPool
:
happyThreadPool
,
loaders
:
[
hbsLoader
]
}),
// new webpack.optimize.CommonsChunkPlugin({
// name: 'libs',
// filename: 'libs.js'
// }),
new
webpack
.
ProvidePlugin
({
$
:
'yoho-jquery'
,
jQuery
:
'yoho-jquery'
,
...
...
public/build/webpack.sw.config.js
View file @
0c11463
const
webpack
=
require
(
'webpack'
);
const
path
=
require
(
'path'
);
module
.
exports
=
{
mode
:
'production'
,
entry
:
{
sw
:
path
.
join
(
__dirname
,
'../js/pwa/sw.js'
)
},
...
...
@@ -16,13 +17,5 @@ module.exports = {
include
:
[
path
.
join
(
__dirname
,
'../../node_modules/workbox-sw'
),
path
.
join
(
__dirname
,
'../js'
)],
use
:
'babel-loader'
}]
},
plugins
:
[
new
webpack
.
DefinePlugin
({
'process.env'
:
{
NODE_ENV
:
'"production"'
}
}),
new
webpack
.
optimize
.
UglifyJsPlugin
()
]
}
};
...
...
Please
register
or
login
to post a comment