-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added full config for NPM publishing
- Loading branch information
1 parent
400f4dc
commit 4362d9c
Showing
3 changed files
with
62 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
import vue from 'rollup-plugin-vue' | ||
import typescript from 'rollup-plugin-typescript2' | ||
import css from 'rollup-plugin-postcss' | ||
import path from 'path' | ||
|
||
export default { | ||
input: 'src/components/Datepicker.vue', | ||
output: { | ||
format: 'esm', | ||
file: 'dist/Datepicker.js' | ||
export default [ | ||
{ | ||
output: { | ||
format: 'esm', | ||
file: 'dist/vue3-datepicker.esm.js', | ||
}, | ||
plugins: [ | ||
typescript(), | ||
vue({ css: false }), | ||
css({ | ||
extract: path.resolve('dist', 'vue3-datepicker.css'), | ||
}), | ||
], | ||
}, | ||
{ | ||
output: { | ||
format: 'cjs', | ||
file: 'dist/vue3-datepicker.cjs.js', | ||
exports: 'default' | ||
}, | ||
plugins: [ | ||
typescript(), | ||
vue({ css: false }), | ||
css({ | ||
extract: false, | ||
inject: false | ||
}) | ||
], | ||
}, | ||
].map((v) => ({ | ||
...v, | ||
input: 'src/datepicker/Datepicker.vue', | ||
external: ['vue', 'date-fns', 'date-fns/fp'], | ||
plugins: [ | ||
typescript(), | ||
vue({ css: false }), | ||
css({ | ||
extract: true, | ||
minimize: true | ||
}), | ||
// resolve(), | ||
] | ||
} | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters