Skip to content

Trying to make it work with font-awesome #78

@kyrsquir

Description

@kyrsquir

I have separate webpack configs for development and production. Production works fine, but development ignores the local file and fetches the one from unpg too. Here's my dev config:

new WebpackCdnPlugin({
    modules: [
        {
            name: 'font-awesome',
            prod: false,
            cssOnly: true,
            style: 'css/font-awesome.min.css',
        }
    ],
    publicPath: '/node_modules'
})

Trying to make it work with localStyle produces an error in the console:
Refused to apply style from 'http://localhost:3000/node_modules/css/font-awesome.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
I guess it's webpack server's "not found" page that it gets and tries to parse.

Could someone please explain me what am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions