JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q22704F
  • License MIT

Neutrino Svelte loader middleware

Package Exports

  • neutrino-middleware-svelte-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (neutrino-middleware-svelte-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Neutrino Svelte loader middleware

npm npm

neutrino-middleware-svelte-loader is a Neutrino middleware for compiling HTML components with Svelte. It is compatible with .html, .htm and .svelte files.

Requirements

  • Node.js v6.9+
  • Neutrino v5

Installation

neutrino-middleware-svelte-loader can be installed from NPM.

❯ npm install --save neutrino-middleware-svelte-loader

Usage

neutrino-middleware-svelte-loader can be consumed from the Neutrino API, middleware, or presets. Require this package and plug it into Neutrino:

const svelteLoader = require('neutrino-middleware-svelte-loader')

neutrino.use(svelteLoader, {
  include: [],
  exclude: []
})
  • include - optional array of paths to include in the compilation. Maps to Webpack's Rule.include
  • exclude - optional array of paths to exclude from the compilation. Maps to Webpack's Rule.include

It is recommended to call this middlware after neutrino.config.module.rule('compile') initialization to avoid unexpected overriding. More imformation about usage of Neutrino middlwares can be found in the documentation.

Rules

This is a list of rules that are used by neutrino-middleware-svelte-loader:

  • svelte: Compiles Svelte components to JavaScript modules. Contains a single loader named the same svelte.
  • compile: Only necessary file extension added.