Skip to content

Commit e0835c0

Browse files
committed
remove dead feature to correct a harmless security warning, update uploadfs to correct a more serious one
1 parent 887d3ce commit e0835c0

File tree

6 files changed

+6
-37
lines changed

6 files changed

+6
-37
lines changed

DEVELOPMENT.md

-12
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,3 @@ We generally aim to follow [Vue best practices](https://vuejs.org/v2/style-guide
1010
### UI component styles
1111

1212
As a rule, all user interface components should have their styles scoped (using the `scoped` attribute). This helps us write simpler CSS selectors and avoide a certain amount of style "bleed" across components. Global styles, and styles for top level Vue apps (e.g., `TheAposNotifications`), should be in `.scss` files and imported into the import file: `/modules/@apostrophecms/ui/ui/apos/scss/imports.scss`.
13-
14-
## Analyzing bundle size
15-
16-
It is possible to analyze the size of the admin UI webpack bundle:
17-
18-
```
19-
APOS_BUNDLE_ANALYZER=1 node app @apostrophecms/asset:build
20-
```
21-
22-
This will display a visualization in your browser.
23-
24-
As of this writing, we are not optimizing the webpack build for production, so expect to see big numbers.

modules/@apostrophecms/asset/index.js

-7
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,6 @@ module.exports = {
253253

254254
await deploy(deployFiles);
255255

256-
if (process.env.APOS_BUNDLE_ANALYZER) {
257-
return new Promise((resolve, reject) => {
258-
// Intentionally never resolve it, so the task never exits
259-
// and the UI stays up
260-
});
261-
}
262-
263256
async function moduleOverrides(modulesDir, source, pnpmPaths) {
264257
await fs.remove(modulesDir);
265258
await fs.mkdirp(modulesDir);

modules/@apostrophecms/asset/lib/webpack/apos/webpack.config.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ const js = require('./webpack.js');
66

77
let BundleAnalyzerPlugin;
88

9-
if (process.env.APOS_BUNDLE_ANALYZER) {
10-
BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
11-
}
12-
139
module.exports = ({
1410
importFile,
1511
modulesDir,
@@ -84,8 +80,7 @@ module.exports = ({
8480
],
8581
symlinks: false
8682
},
87-
stats: 'verbose',
88-
plugins: process.env.APOS_BUNDLE_ANALYZER ? [ new BundleAnalyzerPlugin() ] : []
83+
stats: 'verbose'
8984
};
9085

9186
return merge(config, ...tasks);

modules/@apostrophecms/asset/lib/webpack/apos/webpack.vue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const VueLoaderPlugin = require('vue-loader/lib/plugin');
1+
const { VueLoaderPlugin } = require('vue-loader');
22

33
module.exports = (options, apos) => {
44
return {

modules/@apostrophecms/asset/lib/webpack/src/webpack.config.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ const merge = require('webpack-merge').merge;
33
const scssTask = require('./webpack.scss');
44
const srcBuildNames = [ 'src-build', 'src-es5-build' ];
55

6-
let BundleAnalyzerPlugin;
7-
8-
if (process.env.APOS_BUNDLE_ANALYZER) {
9-
BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
10-
}
11-
126
module.exports = ({
137
importFile,
148
modulesDir,
@@ -99,7 +93,7 @@ module.exports = ({
9993
symlinks: false
10094
},
10195
stats: 'verbose',
102-
plugins: process.env.APOS_BUNDLE_ANALYZER ? [ new BundleAnalyzerPlugin() ] : []
96+
plugins: []
10397
};
10498

10599
if (es5) {

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"tinycolor2": "^1.4.2",
131131
"tough-cookie": "^4.0.0",
132132
"underscore.string": "^3.3.4",
133-
"uploadfs": "^1.22.1",
133+
"uploadfs": "^1.22.3",
134134
"v-tooltip": "^2.0.3",
135135
"vue": "^2.6.14",
136136
"vue-advanced-cropper": "^1.10.1",
@@ -157,10 +157,9 @@
157157
"stylelint": "^14.6.1",
158158
"stylelint-declaration-strict-value": "^1.8.0",
159159
"stylelint-order": "^5.0.0",
160-
"vue-eslint-parser": "^7.1.1",
161-
"webpack-bundle-analyzer": "^3.9.0"
160+
"vue-eslint-parser": "^7.1.1"
162161
},
163162
"browserslist": [
164163
"ie >= 10"
165164
]
166-
}
165+
}

0 commit comments

Comments
 (0)