Skip to content

Commit 745d054

Browse files
committed
fix: fix compatibility with webpack 3
According to the documentation https://vue-loader.vuejs.org/guide/extract-css.html#webpack-3 and some private feedbacks, there are still many users use vue-loader v15 along with webpack 3.
1 parent 151995e commit 745d054

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: lib/plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const webpack = require('webpack')
22
let VueLoaderPlugin = null
33

4-
if (webpack.version[0] > 4) {
4+
if (webpack.version && webpack.version[0] > 4) {
55
// webpack5 and upper
66
VueLoaderPlugin = require('./plugin-webpack5')
77
} else {

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"peerDependencies": {
3636
"css-loader": "*",
37-
"webpack": "^4.1.0 || ^5.0.0-0"
37+
"webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0"
3838
},
3939
"peerDependenciesMeta": {
4040
"cache-loader": {

0 commit comments

Comments
 (0)