From 0135b2ccd26ce4433f91aa37780d54d9e910cf46 Mon Sep 17 00:00:00 2001 From: Dan Skinner Date: Mon, 18 Sep 2023 12:54:41 +0100 Subject: [PATCH] remove CDN build --- packages/vue-router/package.json | 3 +- packages/vue-router/rollup.config.cdn.mjs | 53 ----------------------- 2 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 packages/vue-router/rollup.config.cdn.mjs diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index 5e0117d49..59fd27298 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -12,9 +12,8 @@ "access": "public" }, "scripts": { - "build": "npm run build:npm && npm run build:cdn", + "build": "npm run build:npm", "build:npm": "rollup --config rollup.config.npm.mjs", - "build:cdn": "rollup --config rollup.config.cdn.mjs", "clean": "rm -rf dist/*" }, "bugs": { diff --git a/packages/vue-router/rollup.config.cdn.mjs b/packages/vue-router/rollup.config.cdn.mjs deleted file mode 100644 index 1e31f918c..000000000 --- a/packages/vue-router/rollup.config.cdn.mjs +++ /dev/null @@ -1,53 +0,0 @@ -import fs from 'fs' -import terser from '@rollup/plugin-terser' -import replace from '@rollup/plugin-replace' -import commonjs from '@rollup/plugin-commonjs' -import typescript from '@rollup/plugin-typescript' -import nodeResolve from '@rollup/plugin-node-resolve' - -// the built files for the CDN go in the top-level 'build' directory so they -// can't accidentally be uploaded to NPM somehow -const buildDirectory = '../../build' - -if (!fs.existsSync(buildDirectory)) { - fs.mkdirSync(buildDirectory) -} - -const packageJson = JSON.parse(fs.readFileSync('./package.json')) - -const sharedOutputOptions = { - format: 'es', - name: 'BugsnagVueRouterPerformance', - generatedCode: { - preset: 'es2015', - }, - sourcemap: true, -} - -export default { - input: 'lib/index.ts', - output: [ - { - ...sharedOutputOptions, - file: `${buildDirectory}/bugsnag-vue-router-performance.js`, - }, - { - ...sharedOutputOptions, - file: `${buildDirectory}/bugsnag-vue-router-performance.min.js`, - compact: true, - plugins: [terser({ ecma: 2015 })], - }, - ], - plugins: [ - replace({ - preventAssignment: true, - values: { __VERSION__: packageJson.version }, - }), - typescript({ - // don't output anything if there's a TS error - noEmitOnError: true, - }), - commonjs(), - nodeResolve({ browser: true }), - ], -} \ No newline at end of file