Svelvet Versions Save

? An experimental svelte compiler & watcher that works with snowpack

v0.4.2

4 years ago

Added

  • Allow port to be configured with --port <number> #82

v0.4.1

4 years ago

Fixed

  • Fix missing web_module check for dynamic imports #72

v0.4.0

4 years ago

Breaking Changes

  • Use /public directory for static assets instead of copying from /src #65

Migration Guide for v0.3.x -> v0.4.0

See an example migration for the basic example project here.

New public directory for static assets

A new ./public directory is required for static assets. All non-js and non-svelte files inside ./src must be moved to ./public. Svelvet no longer copies files over from ./src except for js and svelte files which are processed first.

Svelvet no longer compiles to ./dist. We now build your svelte and js files to ./public/dist.

Instead of deploying the ./public/dist directory, you need to deploy the entire ./public directory.

You also must update your script entrypoint inside your html files to point to the new location.

<!-- BEFORE -->
<script type="module">
    import App from './App.js';

    new App({
        target: document.querySelector('#app'),
    });
</script>

<!-- AFTER -->
<script type="module">
    import App from './dist/App.js';

    new App({
        target: document.querySelector('#app'),
    });
</script>

New babel plugin for those that have a custom config

If you have chosen to use a custom babel.config.js, you must change the snowpack plugin to a new svelvet plugin instead.

// BEFORE
plugins: [
    // You can override the babel config but you must have this plugin defined.
    [
        'snowpack/assets/babel-plugin.js',
        {
            // Append .js to all src file imports
            optionalExtensions: true,
            importMap: '../dist/web_modules/import-map.json',
        },
    ],
    // Your plugins...
],

// AFTER
plugins: [
    'svelvet/plugins/babel.js',
    // Your plugins...
],

v0.3.6

4 years ago

Fixed

  • Let babel know the absolute file path of the file currently being processed #61

v0.3.5

4 years ago

Added

  • Pass through snowpack log colors and show stats during production builds #56

Fixed

  • Prevent external imports from triggering snowpack web_module regeneration #55
  • Normalize incoming paths to getDestPath for Windows #57

v0.3.4

4 years ago

Added

  • Add svelte preprocessor support #53

v0.3.3

4 years ago

Fixed

  • Check for missing web modules in dev mode and fix them #52

v0.3.2

4 years ago

Fixed

  • Upgrade snowpack to support 3rd party svelte files #48

v0.3.1

4 years ago

Fixed

  • Call node explicitly in order to run snowpack on Windows #44
  • Use path.sep to fix windows build error #45

v0.3.0

4 years ago

Breaking Changes

  • Auto delete dist directory on build #42