Code Monkey home page Code Monkey logo

svelte-loader-hot's Introduction

svelte-loader-hot's People

Contributors

artefall avatar bryanwood avatar conduitry avatar crisfole avatar cristinecula avatar ctm-balfre-robert avatar dependabot[bot] avatar egoist avatar ekhaled avatar esarbanis avatar halfnelson avatar jacwright avatar jesseskinner avatar kaisermann avatar malkomalko avatar nikku avatar rendall avatar rich-harris avatar rixo avatar shancarter avatar simulatedgreg avatar vperron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

episage

svelte-loader-hot's Issues

Any idea why emitCss doesn't work or not supported yet?

I find this unofficial custom svelte loader with HMR support is really awesome. But with no emitCss support, the webpack cannot even touch my css in svelte, the sprites and images I use there cannot be loaded in browser because their paths is not resolved by webpack compiler.

Or any idea how can I use this loader but still can use css in svelte with the some relative path images?

Just flat doesn't seem to be working with electron.

Unfortunatly, it doesn't seem like this is working at all with the electron setup I have going.

I'm just loading up a browser window right now and loading the webpack-dev-server's URL. everything loads up fine initially, but no changes are ever reflected. The page doesn't even refresh, but I can see that webpack is rebuilding with every change.

Here's the webpack config I'm using for some context.
And I am passing the --hot flag to the dev server. Still nothing :(

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = renderConfig = {
  entry: "./src/app/index.js",
  output: {
    path: path.join(__dirname, "/out/app/"),
    publicPath: 'http://localhost:8080/out/app/',
    filename: "bundle.js"
  },
  mode: "development",
  target: "electron-renderer",
  devServer: {
    publicPath: '/',
    hot: true,
    overlay: true
  },
  module: {
    rules: [
      {
        test: /\.css/,
        exclude: /node_modules/,
        use: ["style-loader", "postcss-loader"]
      },
      {
        test: /\.svelte/,
        include: path.resolve(__dirname, "src/app"),
        exclude: /node_modules/,
        use: {
          loader: "svelte-loader-hot",
          options: {
            hotReload: true
          }
        }
      },
      {
        test: /\.js/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader"
        }
      }
    ]
  },
  plugins: [new HtmlWebpackPlugin()]
};
``

Fails with webpack

With webpack (following the template), attempt to update even the simplest component fails with Failed to init component. More specifically: TypeError: "cmp.$capture_state is not a function".
This happens regardless of the value of optimistic.

preprocess error

I just switched from svelte-loader to svelte-loader-hot and in my webpack config I set up svelte-loader with the preprocess option to parse some tailwind css syntax.

The preprocess works with svelte-loader but fails with svelte-loader-hot

When I remove the specific tailwind css syntax, svelte-loader-hot works and hot reload.

Is there a change in the preprocess option from svelte-loader to svelte-loader-hot ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.