Skip to content

Commit 4f98482

Browse files
authored
support webpack5 (#35)
1 parent d497ba7 commit 4f98482

File tree

3 files changed

+1173
-794
lines changed

3 files changed

+1173
-794
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"src"
3434
],
3535
"peerDependencies": {
36-
"webpack": "^4.0.0"
36+
"webpack": ">=4.0.0"
3737
},
3838
"dependencies": {
3939
"loader-utils": "^2.0.0",
@@ -48,7 +48,8 @@
4848
"memory-fs": "^0.5.0",
4949
"prettier": "^2.1.1",
5050
"rimraf": "^3.0.2",
51-
"webpack": "^4.44.1"
51+
"webpack4": "npm:webpack@4",
52+
"webpack5": "npm:webpack@5"
5253
},
5354
"keywords": [
5455
"webpack",

test/helpers/compiler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path')
22

33
const rimraf = require('rimraf')
4-
const webpack = require('webpack')
4+
const webpack = require('webpack4')
55
const MemoryFS = require('memory-fs')
66

77
const modules = (config) => {
@@ -39,7 +39,7 @@ const output = (config) => {
3939
module.exports = function (fixture, config, options) {
4040
config = {
4141
mode: 'development',
42-
devtool: config.devtool || 'sourcemap',
42+
devtool: config.devtool || 'source-map',
4343
context: path.resolve(__dirname, '..', 'fixtures'),
4444
entry: `./${fixture}`,
4545
output: output(config),

0 commit comments

Comments
 (0)