piral-vue-3 0.15.9-beta.5417 → 0.15.9-beta.5420

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +38 -5
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -79,10 +79,10 @@ The `vue` package should be shared with the pilets via the *package.json*:
79
79
 
80
80
  ```json
81
81
  {
82
- "pilets": {
83
- "externals": [
84
- "vue"
85
- ]
82
+ "importmap": {
83
+ "imports": {
84
+ "vue": ""
85
+ }
86
86
  }
87
87
  }
88
88
  ```
@@ -92,7 +92,7 @@ For your bundler additional packages may be necessary. For instance, for Webpack
92
92
  First, install the additional dev dependencies
93
93
 
94
94
  ```sh
95
- npm i vue-loader@next @vue-compiler-sfc --save-dev
95
+ npm i vue-loader @vue/compiler-sfc --save-dev
96
96
  ```
97
97
 
98
98
  then add a *webpack.config.js* to use them
@@ -112,6 +112,39 @@ module.exports = function (config) {
112
112
 
113
113
  Now, *.vue* files are correctly picked up and handled.
114
114
 
115
+ Alternatively, the Webpack configuration can be rather simplistic. In many cases you can use the convenience `extend-webpack` module.
116
+
117
+ This is how your *webpack.config.js* can look like with the convenience module:
118
+
119
+ ```js
120
+ const extendWebpack = require('piral-vue-3/extend-webpack');
121
+
122
+ module.exports = extendWebpack({});
123
+ ```
124
+
125
+ For using `piral-vue/extend-webpack` you must have installed:
126
+
127
+ - `vue-loader`
128
+ - `@vue/compiler-sfc`
129
+ - `webpack`, e.g., via `piral-cli-webpack5`
130
+
131
+ You can do that via:
132
+
133
+ ```sh
134
+ npm i vue-loader @vue/compiler-sfc piral-cli-webpack5 --save-dev
135
+ ```
136
+
137
+ The available options for `piral-vue-3/extend-webpack` are the same as for the options of the `vue-loader`, e.g.:
138
+
139
+ ```js
140
+ const extendWebpack = require('piral-vue-3/extend-webpack');
141
+
142
+ module.exports = extendWebpack({
143
+ enableTsInTemplate: true,
144
+ customElement: /\.ce\.vue$/,
145
+ });
146
+ ```
147
+
115
148
  :::
116
149
 
117
150
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-vue-3",
3
- "version": "0.15.9-beta.5417",
3
+ "version": "0.15.9-beta.5420",
4
4
  "description": "Plugin for integrating Vue@3 components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -28,6 +28,9 @@
28
28
  "./convert": {
29
29
  "import": "./convert.js"
30
30
  },
31
+ "./extend-webpack": {
32
+ "require": "./extend-webpack.js"
33
+ },
31
34
  "./esm/*": {
32
35
  "import": "./esm/*"
33
36
  },
@@ -65,11 +68,11 @@
65
68
  "test": "echo \"Error: run tests from root\" && exit 1"
66
69
  },
67
70
  "devDependencies": {
68
- "piral-core": "0.15.9-beta.5417",
71
+ "piral-core": "0.15.9-beta.5420",
69
72
  "vue": "^3.0.0"
70
73
  },
71
74
  "peerDependencies": {
72
75
  "vue": "^3.0.0"
73
76
  },
74
- "gitHead": "dde0a115d916010beb178e29abe04fbe116f63f1"
77
+ "gitHead": "a4b6f7cb2d3285e0d486c7951ad6c3d6484b11f8"
75
78
  }