Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
dec160fd
Commit
dec160fd
authored
7 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
chore: change inject package dependencies
parent
c06baffb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/webpack.dev.conf.js
+1
-3
1 addition, 3 deletions
build/webpack.dev.conf.js
build/webpack.prod.conf.js
+1
-3
1 addition, 3 deletions
build/webpack.prod.conf.js
src/utils/index.js
+3
-1
3 additions, 1 deletion
src/utils/index.js
with
5 additions
and
7 deletions
build/webpack.dev.conf.js
+
1
−
3
View file @
dec160fd
...
@@ -6,7 +6,6 @@ var merge = require('webpack-merge')
...
@@ -6,7 +6,6 @@ var merge = require('webpack-merge')
var
baseWebpackConfig
=
require
(
'
./webpack.base.conf
'
)
var
baseWebpackConfig
=
require
(
'
./webpack.base.conf
'
)
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
var
FriendlyErrorsPlugin
=
require
(
'
friendly-errors-webpack-plugin
'
)
var
FriendlyErrorsPlugin
=
require
(
'
friendly-errors-webpack-plugin
'
)
var
dependencies
=
require
(
'
../package.json
'
).
dependencies
// add hot-reload related code to entry chunks
// add hot-reload related code to entry chunks
Object
.
keys
(
baseWebpackConfig
.
entry
).
forEach
(
function
(
name
)
{
Object
.
keys
(
baseWebpackConfig
.
entry
).
forEach
(
function
(
name
)
{
...
@@ -26,8 +25,7 @@ module.exports = merge(baseWebpackConfig, {
...
@@ -26,8 +25,7 @@ module.exports = merge(baseWebpackConfig, {
cache
:
true
,
cache
:
true
,
plugins
:
[
plugins
:
[
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'
process.env
'
:
config
.
dev
.
env
,
'
process.env
'
:
config
.
dev
.
env
'
DEPENDENCIES
'
:
JSON
.
stringify
(
dependencies
)
}),
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new
webpack
.
HotModuleReplacementPlugin
(),
new
webpack
.
HotModuleReplacementPlugin
(),
...
...
This diff is collapsed.
Click to expand it.
build/webpack.prod.conf.js
+
1
−
3
View file @
dec160fd
...
@@ -8,7 +8,6 @@ var CopyWebpackPlugin = require('copy-webpack-plugin')
...
@@ -8,7 +8,6 @@ var CopyWebpackPlugin = require('copy-webpack-plugin')
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
var
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
)
var
ExtractTextPlugin
=
require
(
'
extract-text-webpack-plugin
'
)
var
ExtractTextPlugin
=
require
(
'
extract-text-webpack-plugin
'
)
var
OptimizeCSSPlugin
=
require
(
'
optimize-css-assets-webpack-plugin
'
)
var
OptimizeCSSPlugin
=
require
(
'
optimize-css-assets-webpack-plugin
'
)
var
dependencies
=
require
(
'
../package.json
'
).
dependencies
var
env
=
config
.
build
[
process
.
env
.
env_config
+
'
Env
'
]
var
env
=
config
.
build
[
process
.
env
.
env_config
+
'
Env
'
]
...
@@ -34,8 +33,7 @@ var webpackConfig = merge(baseWebpackConfig, {
...
@@ -34,8 +33,7 @@ var webpackConfig = merge(baseWebpackConfig, {
plugins
:
[
plugins
:
[
// http://vuejs.github.io/vue-loader/en/workflow/production.html
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'
process.env
'
:
env
,
'
process.env
'
:
env
'
DEPENDENCIES
'
:
JSON
.
stringify
(
dependencies
)
}),
}),
new
webpack
.
optimize
.
UglifyJsPlugin
({
new
webpack
.
optimize
.
UglifyJsPlugin
({
compress
:
{
compress
:
{
...
...
This diff is collapsed.
Click to expand it.
src/utils/index.js
+
3
−
1
View file @
dec160fd
...
@@ -268,5 +268,7 @@ export function deepClone(source) {
...
@@ -268,5 +268,7 @@ export function deepClone(source) {
// get dependencies verison from package.json by webpack.DefinePlugin
// get dependencies verison from package.json by webpack.DefinePlugin
export
function
getVersion
(
name
)
{
export
function
getVersion
(
name
)
{
return
DEPENDENCIES
[
name
]
// eslint-disable-line
import
(
'
../../package
'
).
then
(
p
=>
{
return
p
.
dependencies
[
name
]
})
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment