Remove umd bundle

This commit is contained in:
Christian Kaisermann 2019-06-19 10:41:57 -03:00
parent c328197edb
commit f38b08b3a1
3 changed files with 16 additions and 32 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "svelte-i18n",
"version": "1.0.7",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -2,9 +2,7 @@
"name": "svelte-i18n",
"version": "1.1.0",
"main": "dist/i18n.js",
"module": "dist/i18n.mjs",
"browser": "dist/i18n.umd.js",
"types": "src/index.d.ts",
"module": "src/index.js",
"license": "MIT",
"description": "Internationalization library for Svelte",
"author": "Christian Kaisermann <christian@kaisermann.me>",

View File

@ -1,33 +1,19 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from "rollup-plugin-terser";
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import pkg from './package.json';
import pkg from './package.json'
const plugins = [
resolve(),
commonjs(),
terser()
]
const plugins = [resolve(), commonjs(), terser()]
export default [
// browser-friendly UMD build
{
input: 'src/index.js',
output: {
name: 'svelteI18n',
file: pkg.browser,
format: 'umd'
},
plugins
},
{
input: 'src/index.js',
external: [...Object.keys(pkg.dependencies), 'svelte/store'],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
{
input: 'src/index.js',
external: [...Object.keys(pkg.dependencies), 'svelte/store'],
outpfut: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' },
],
plugins
}
];
plugins,
},
]