Move to latest webpack-vue-config and global babel config
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
Родитель
aff3a20209
Коммит
572a3e6eff
|
@ -1,13 +1,3 @@
|
|||
module.exports = {
|
||||
plugins: ['add-module-exports'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
corejs: 3,
|
||||
useBuiltIns: 'entry',
|
||||
modules: 'commonjs',
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
const babelConfig = require('@nextcloud/babel-config')
|
||||
|
||||
module.exports = babelConfig
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
31
package.json
31
package.json
|
@ -6,7 +6,7 @@
|
|||
"license": "agpl",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.js",
|
||||
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
|
@ -21,41 +21,44 @@
|
|||
"@nextcloud/capabilities": "^1.0.4",
|
||||
"@nextcloud/dialogs": "^3.1.1",
|
||||
"@nextcloud/event-bus": "^1.2.0",
|
||||
"@nextcloud/notify_push": "^1.0.1",
|
||||
"@nextcloud/moment": "^1.1.1",
|
||||
"@nextcloud/notify_push": "^1.0.1",
|
||||
"@nextcloud/router": "^2.0.0",
|
||||
"@nextcloud/vue": "^3.8.0",
|
||||
"core-js": "^3.10.0",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"vue": "^2.6.12",
|
||||
"vue-tooltip": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.15",
|
||||
"@babel/eslint-parser": "^7.13.14",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.13.15",
|
||||
"@nextcloud/babel-config": "^1.0.0-beta.1",
|
||||
"@nextcloud/browserslist-config": "^2.1.0",
|
||||
"@nextcloud/eslint-config": "^2.2.0",
|
||||
"@nextcloud/eslint-plugin": "^1.5.0",
|
||||
"@nextcloud/webpack-vue-config": "^1.2.0",
|
||||
"@nextcloud/eslint-config": "^5.0.0",
|
||||
"@nextcloud/eslint-plugin": "^2.0.0",
|
||||
"@nextcloud/webpack-vue-config": "^4.0.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"babel-loader-exclude-node-modules-except": "^1.1.2",
|
||||
"babel-plugin-add-module-exports": "^1.0.4",
|
||||
"css-loader": "^5.2.1",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.1",
|
||||
"css-loader": "^4.3.0",
|
||||
"eslint": "^7.24.0",
|
||||
"eslint-config-standard": "^16.0.2",
|
||||
"eslint-import-resolver-webpack": "^0.13.0",
|
||||
"eslint-loader": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-standard": "^4.1.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"eslint-plugin-vue": "^7.9.0",
|
||||
"eslint-webpack-plugin": "^2.5.3",
|
||||
"file-loader": "^6.2.0",
|
||||
"node-polyfill-webpack-plugin": "^1.1.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"sass": "^1.32.8",
|
||||
"sass-loader": "^10.1.1",
|
||||
"style-loader": "^1.3.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"stylelint": "^13.12.0",
|
||||
"stylelint-config-recommended-scss": "^4.2.0",
|
||||
"stylelint-scss": "^3.19.0",
|
||||
|
@ -63,8 +66,8 @@
|
|||
"url-loader": "^4.1.1",
|
||||
"vue-loader": "^15.9.6",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^3.3.12"
|
||||
"webpack": "^5.31.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"extends @nextcloud/browserslist-config"
|
||||
|
|
11
webpack.js
11
webpack.js
|
@ -1,13 +1,16 @@
|
|||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
|
||||
|
||||
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
|
||||
|
||||
const jsRule = webpackConfig.module.rules.findIndex(t => (t.test.toString() === /\.js$/.toString()))
|
||||
|
||||
webpackConfig.module.rules[jsRule].exclude = BabelLoaderExcludeNodeModulesExcept([
|
||||
// Edit JS rule
|
||||
webpackRules.RULE_JS.exclude = BabelLoaderExcludeNodeModulesExcept([
|
||||
'@juliushaertl/vue-richtext',
|
||||
'@nextcloud/event-bus',
|
||||
'semver',
|
||||
])
|
||||
|
||||
// Merge rules by replacing existing tests
|
||||
// Replaces rules array
|
||||
webpackConfig.module.rules = Object.values(webpackRules)
|
||||
|
||||
module.exports = webpackConfig
|
||||
|
|
Загрузка…
Ссылка в новой задаче