Skip to content

Commit cdf46ef

Browse files
committed
🧹 chore: Rollup setting
1 parent e6db9f4 commit cdf46ef

File tree

4 files changed

+403
-10
lines changed

4 files changed

+403
-10
lines changed

‎dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function (exports, LaravelEcho) {
1+
var vueEcho = (function (exports, LaravelEcho) {
22
'use strict';
33

44
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

‎package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@phantasweng/vue-echo",
3-
"version": "0.1.0",
3+
"version": "0.1.1-dev",
44
"main": "dist/index.esm.js",
55
"description": "Vue Laravel Echo - Simply import Laravel Echo to Vue instance",
66
"scripts": {
@@ -10,14 +10,17 @@
1010
"author": "PhantasWeng",
1111
"license": "ISC",
1212
"dependencies": {
13+
"laravel-echo": "^1.10.0",
14+
"pusher-js": "^7.0.3"
15+
},
16+
"devDependencies": {
17+
"@babel/core": "^7.14.2",
1318
"@rollup/plugin-babel": "^5.3.0",
19+
"@rollup/plugin-node-resolve": "^13.0.0",
1420
"@vue/compiler-sfc": "^3.0.11",
15-
"laravel-echo": "^1.10.0",
16-
"pusher-js": "^7.0.3",
1721
"rollup": "^2.47.0",
1822
"rollup-plugin-vue": "^6.0.0"
1923
},
20-
"devDependencies": {},
2124
"repository": {
2225
"type": "git",
2326
"url": "git+https://github.com/PhantasWeng/vue-echo.git"

‎rollup.config.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,45 @@ export default [
1111
plugins: [
1212
vue({ css: false }),
1313
babel({ babelHelpers: 'bundled' })
14+
],
15+
external: [
16+
'laravel-echo'
1417
]
1518
},
1619
// SSR build.
1720
{
1821
input: './src/index.js',
1922
output: {
2023
format: 'cjs',
21-
file: 'dist/index.ssr.js'
24+
file: 'dist/index.ssr.js',
25+
exports: 'named'
2226
},
2327
plugins: [
2428
vue({ css: false, optimizeSSR: true }),
2529
babel({ babelHelpers: 'bundled' })
30+
],
31+
external: [
32+
'laravel-echo'
2633
]
2734
},
2835
// Browser build.
2936
{
3037
input: './src/index.js',
3138
output: {
39+
name: 'vueEcho',
40+
globals: {
41+
'laravel-echo': 'LaravelEcho'
42+
},
3243
format: 'iife',
33-
file: 'dist/index.js'
44+
file: 'dist/index.js',
45+
exports: 'named'
3446
},
3547
plugins: [
3648
vue({ css: false, optimizeSSR: true }),
3749
babel({ babelHelpers: 'bundled' })
50+
],
51+
external: [
52+
'laravel-echo'
3853
]
3954
}
4055
]

0 commit comments

Comments
 (0)