Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

SpaServices Webpack Dev Middleware - automatic insertion of "webpack-hot-middleware/client" #432

Closed
@kukjevov

Description

@kukjevov

I have problem with automatic prepending of "webpack-hot-middleware/client" to each entry in webpack config.

Maybe i have something wrong in my configuration but. i have following configuration (snippet):

entry:
{
    "style": [path.join(__dirname, "content/site.scss")],
    "app": [path.join(__dirname, "app/app.ts")],
    "polyfills-import": path.join(__dirname, "app/polyfills.ts"),
    "vendor-import": path.join(__dirname, "app/vendor.ts")
},
module:
{
    loaders:
    [
        {
            test: /\.ts$/,
            loaders: ['awesome-typescript-loader', 'angular2-template-loader']
        },
        {
            test: /\.html$/,
            loader: 'raw-loader'
        },
        {
            test: /\.json$/,
            loader: 'json-loader'
        },
        {
            test: /\.scss$/,
            loaders: ['style-loader', 'css-loader', 'sass-loader']
        },
        {
            test: /\.(ttf|eot|svg)$/,
            loader: "file-loader"
        }
    ]
},

When you prepend that "webpack-hot-middleware/client" HMR string for each entry point my "style" entry does not inject css into html anymore. It works if you append it, but HMR is still not working for style entry, that means if i change something in scss, file is compiled, but nothing is replaced when finishes.

Maybe this is not problem of this middleware, maybe it is just my configuration which is not correct.

Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions