Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to make it work with font-awesome #78

Open
kyrsquir opened this issue Jun 7, 2020 · 0 comments
Open

Trying to make it work with font-awesome #78

kyrsquir opened this issue Jun 7, 2020 · 0 comments

Comments

@kyrsquir
Copy link

kyrsquir commented Jun 7, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant