Update to webpack 5

master
Chocobozzz 3 years ago
parent d1d1293b3d
commit 0595929613
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
  1. 2
      client/common-client-plugin.js
  2. 5060
      package-lock.json
  3. 5
      package.json
  4. 15
      webpack.config.js

@ -1,5 +1,5 @@
function register ({ registerHook, peertubeHelpers }) {
console.log('Hello world')
}
export {

5060
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -16,9 +16,8 @@
"assets/style.css"
],
"devDependencies": {
"@purtuga/esm-webpack-plugin": "^1.1.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
"webpack": "^5.50.0",
"webpack-cli": "^4.7.2"
},
"engine": {
"peertube": ">=1.3.0"

@ -1,20 +1,23 @@
const path = require("path")
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
const clientFiles = [
'common-client-plugin.js'
]
let config = clientFiles.map(f => ({
entry: "./client/" + f,
experiments: {
outputModule: true
},
output: {
path: path.resolve(__dirname, "./dist"),
filename: "./" + f,
library: "script",
libraryTarget: "var"
},
plugins: [ new EsmWebpackPlugin() ]
library: {
type: "module"
}
}
}))
module.exports = config

Loading…
Cancel
Save