Skip to content

Commit 9c93414

Browse files
committed
fix: add webpack deps for vue3
1 parent 28a1446 commit 9c93414

File tree

8 files changed

+56
-6
lines changed

8 files changed

+56
-6
lines changed

packages/plaid-webpack-vue/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"vue-template-compiler": "^2.6.14"
1616
},
1717
"peerDependencies": {
18-
"@gera2ld/plaid": "2.x"
18+
"@gera2ld/plaid": "2.x",
19+
"vue": "2.x"
1920
},
2021
"publishConfig": {
2122
"access": "public",

packages/plaid-webpack-vue/webpack/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.log
2+
*.lock
3+
.tmp

packages/plaid-webpack-vue3/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@gera2ld/plaid-webpack-vue3`
2+
3+
A bunch of helpers to add functions to your webpack configuration.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "@gera2ld/plaid-webpack-vue3",
3+
"version": "2.4.0",
4+
"description": "Webpack configuration for Vue 3",
5+
"keywords": [
6+
"webpack",
7+
"vue"
8+
],
9+
"author": "Gerald <[email protected]>",
10+
"homepage": "https://github.com/gera2ld/plaid#readme",
11+
"license": "ISC",
12+
"dependencies": {
13+
"@gera2ld/plaid-common-vue": "^2.4.0",
14+
"@vue/compiler-sfc": "^3.2.26",
15+
"vue-loader": "^17.0.0"
16+
},
17+
"peerDependencies": {
18+
"@gera2ld/plaid": "2.x",
19+
"vue": "3.x"
20+
},
21+
"publishConfig": {
22+
"access": "public",
23+
"registry": "https://registry.npmjs.org/"
24+
},
25+
"repository": {
26+
"type": "git",
27+
"url": "git+https://github.com/gera2ld/plaid.git"
28+
},
29+
"bugs": {
30+
"url": "https://github.com/gera2ld/plaid/issues"
31+
}
32+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const { defaultOptions } = require('@gera2ld/plaid/util');
2+
3+
defaultOptions.vueOptions = {
4+
compilerOptions: {
5+
whitespace: 'condense',
6+
},
7+
};
8+
defaultOptions.extensions.push('.vue');

packages/plaid-webpack/webpack/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const nameMap = mergeLibraries({
2222
sw: './sw',
2323
url: './url',
2424
devServer: './dev-server',
25+
vue: './vue',
2526
}, 'webpack', /^plaid-webpack-/);
2627

2728
const configurators = Object.entries(nameMap)

packages/plaid-webpack-vue/webpack/vue.js renamed to packages/plaid-webpack/webpack/vue.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
const VueLoaderPlugin = require('vue-loader/lib/plugin');
2-
31
module.exports = (config, options) => {
2+
let VueLoaderPlugin;
3+
try {
4+
VueLoaderPlugin = require('vue-loader/lib/plugin');
5+
} catch (err) {
6+
console.error(`Please install @gera2ld/plaid-webpack-vue or @gera2ld/plaid-webpack-vue3 first`);
7+
throw err;
8+
}
49
const {
510
vueOptions,
611
} = options;

0 commit comments

Comments
 (0)