Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfee8834

Browse files
author
Javier Diaz
committed
chore: build library config
1 parent7dccb1d commitfee8834

File tree

3 files changed

+280
-12
lines changed

3 files changed

+280
-12
lines changed

‎package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
"license":"MIT",
1010
"private":false,
1111
"scripts": {
12-
"build":"vue-cli-service build --target lib --name VueTinyPagination index.js",
12+
"build":"rollup --config rollup.config.js",
1313
"lint":"vue-cli-service lint",
1414
"test:unit":"vue-cli-service test:unit",
1515
"prepare":"yarn test:unit && yarn build"
1616
},
17+
"main":"dist/vue-tiny-pagination.umd.js",
18+
"module":"dist/vue-tiny-pagination.esm.js",
19+
"unpkg":"dist/vue-tiny-pagination.min.js",
1720
"repository": {
1821
"type":"git",
1922
"url":"git+https://github.com/coderdiaz/vue-tiny-pagination.git"
@@ -45,6 +48,9 @@
4548
"babel-core":"7.0.0-bridge.0",
4649
"babel-jest":"^23.0.1",
4750
"node-sass":"^4.9.0",
51+
"rollup":"^1.8.0",
52+
"rollup-plugin-commonjs":"^9.2.3",
53+
"rollup-plugin-vue":"^4.7.2",
4854
"sass-loader":"^7.0.1",
4955
"vue-template-compiler":"^2.5.17"
5056
}

‎rollup.config.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
importvuefrom'rollup-plugin-vue';
2+
importcommonjsfrom'rollup-plugin-commonjs';
3+
4+
exportdefault[
5+
// ESM build to be used with webpack/rollup.
6+
{
7+
input:'index.js',
8+
output:{
9+
format:'esm',
10+
file:'dist/vue-tiny-pagination.esm.js',
11+
},
12+
plugins:[
13+
vue(),
14+
commonjs(),
15+
],
16+
},
17+
// UMD build.
18+
{
19+
input:'index.js',
20+
output:{
21+
name:'VueTinyPagination',
22+
format:'umd',
23+
file:'dist/vue-tiny-pagination.umd.js',
24+
},
25+
plugins:[
26+
vue(),
27+
commonjs(),
28+
],
29+
},
30+
// SSR build.
31+
{
32+
input:'index.js',
33+
output:{
34+
format:'cjs',
35+
file:'dist/vue-tiny-pagination.ssr.js',
36+
},
37+
plugins:[
38+
vue({template:{optimizeSSR:true}}),
39+
commonjs(),
40+
],
41+
},
42+
// Browser build.
43+
{
44+
input:'index.js',
45+
output:{
46+
name:'VueTinyPagination',
47+
format:'iife',
48+
file:'dist/vue-tiny-pagination.min.js',
49+
},
50+
plugins:[
51+
vue(),
52+
commonjs(),
53+
],
54+
},
55+
];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp