Skip to content

Commit 948b215

Browse files
authored
Update packaging-sfc-for-npm.md (#2555)
Updating dependencies: both [rollup-plugin-buble](https://github.com/rollup/rollup-plugin-buble) and [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) have been moved to a [plugins library](https://github.com/rollup/plugins).
1 parent 5abc3d0 commit 948b215

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/v2/cookbook/packaging-sfc-for-npm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ There is no need to write your module multiple times. It is possible to prepare
113113
},
114114
"devDependencies": {
115115
"rollup": "^1.17.0",
116-
"rollup-plugin-buble": "^0.19.8",
117-
"rollup-plugin-commonjs": "^10.0.1",
116+
"@rollup/plugin-buble": "^0.21.3",
117+
"@rollup/plugin-commonjs": "^11.1.0",
118118
"rollup-plugin-vue": "^5.0.1",
119119
"vue": "^2.6.10",
120120
"vue-template-compiler": "^2.6.10"
@@ -170,9 +170,9 @@ Notice the first line directly imports your SFC, and the last line exports it un
170170
With the package.json `scripts` section ready and the SFC wrapper in place, all that is left is to ensure Rollup is properly configured. Fortunately, this can be done with a small 16 line rollup.config.js file:
171171

172172
```js
173-
import commonjs from 'rollup-plugin-commonjs'; // Convert CommonJS modules to ES6
173+
import commonjs from '@rollup/plugin-commonjs'; // Convert CommonJS modules to ES6
174174
import vue from 'rollup-plugin-vue'; // Handle .vue SFC files
175-
import buble from 'rollup-plugin-buble'; // Transpile/polyfill with reasonable browser support
175+
import buble from '@rollup/plugin-buble'; // Transpile/polyfill with reasonable browser support
176176
export default {
177177
input: 'src/wrapper.js', // Path relative to package.json
178178
output: {

0 commit comments

Comments
 (0)