diff --git a/.gitignore b/.gitignore index 69cfed1477..176a005741 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ node_modules /src/compiler/compile/internal_exports.ts /animate -/dev /easing /environment/ /internal diff --git a/rollup.config.js b/rollup.config.js index ef732cc9d5..0f1678de02 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,21 +13,11 @@ const ts_plugin = is_publish ? typescript({ include: 'src/**', typescript: require('typescript') }) : sucrase({ transforms: ['typescript'] }); -// documented in src/ambient.ts const globals = (name) => - name === 'compiler' - ? replace({ - 'var __VERSION__: string': 'var rollup_removes_this', - '__VERSION__': `"${pkg.version}"`, - }) - : replace({ - 'var __DEV__: boolean': 'var rollup_removes_this', - '__DEV__': name === 'dev', - 'var __TEST__: boolean': 'var rollup_removes_this', - '__TEST__': name === 'test', - 'var __VERSION__: string': 'var rollup_removes_this', - '__VERSION__': `"${pkg.version}"`, - }); + replace({ + 'var __VERSION__: string': 'var rollup_removes_this', + '__VERSION__': `"${pkg.version}"`, + }); /** * */ @@ -61,12 +51,6 @@ export default [ * -> 'svelte/index.js' */ default: { file: 'index', path: '.' }, - /** - * Development main runtime - * -> 'svelte/dev/index.js' - * redirected to by the compiler - */ - dev: { file: 'index', path: '.' }, }, plugins: [ts_plugin], }), @@ -83,12 +67,6 @@ export default [ * -> 'svelte/[library]/index.js' */ [library]: { file: 'index', path: '..' }, - /** - * Development runtime - * -> 'svelte/dev/[library].js' - * Must be redirected to by user's bundler - */ - dev: { file: library, path: '.' }, }, plugins: [ ts_plugin, diff --git a/src/ambient.ts b/src/ambient.ts index c567d4577d..7853694bda 100644 --- a/src/ambient.ts +++ b/src/ambient.ts @@ -1,55 +1 @@ -/** - * __DEV__ - * - * Used in src/runtime - * - * Bundles dev runtime to svelte/dev/[library].[m]js - * the compiler rewrites its own 'svelte' imports to 'svelte/dev' automatically - * - */ -declare var __DEV__: boolean; -/** - * __VERSION__ - * - * Svelte's version in package.json - * Used in src/compiler and src/runtime - * - */ declare var __VERSION__: string; -/** - * __COMPILER_API_VERSION__ - * - * Unique ID passed to the compiler - * Used to mitigate breaking changes with bundler plugins - * - * VERSIONS ( default is "3.0.0" ) - * - * >3.22.0 : { - * - * The change : - * A different runtime is now used in dev mode, - * every import has to go through 'svelte/dev' instead of 'svelte' - * - * Requirement : - * In dev mode, bundler plugins must make sure that every 'svelte' import is replaced by 'svelte/dev' - * - * } - * - */ -//declare var __COMPILER_API_VERSION__: boolean; -/** - * Unique ID devtools must pass to the compiler - * Used to - * - * VERSIONS ( default is "^3.21.0" ) - * - 0 (default) : compiler imports from prod runtime - * - 1 : in dev mode, compiler imports from dev runtime - */ -//declare var __DEVTOOLS_API_VERSION__: boolean; - -/** - * TODO - * Bundle different runtime for tests - * instead of relying on hacks - */ -declare var __TEST__: boolean;