Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

public path issue #22

Open
linyi01 opened this issue May 5, 2016 · 10 comments
Open

public path issue #22

linyi01 opened this issue May 5, 2016 · 10 comments

Comments

@linyi01
Copy link

linyi01 commented May 5, 2016

fontgen-loader uses path.join(pub, url) to generate urls in css, but sometimes the publicPath is a CDN link(e.g. https://cdn.com), the generated url is incorrect.

@kgdev
Copy link

kgdev commented May 5, 2016

#23

@lbineau
Copy link

lbineau commented Jul 27, 2016

Same issue here (I have a different public path than usual).
So it generates the font files properly but the require to generate CSS files is not working.

  output: {
    path: path.join(__dirname, '../dist'),
    filename: 'bundle.js',
    publicPath: 'http://localhost:3000/'
  },
ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/cdb8f36dd927c0c211ce6ad980247d74-Awesomecons.eot in /Users/........../src/fonts/icons
 @ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:88-170

ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/61a8badb24a0fb8cded9d75b6d9b572e-Awesomecons.woff in /Users/........../src/fonts/icons
 @ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:223-306

ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/3ecd05a81970adec606ff2922b05c922-Awesomecons.ttf in /Users/........../src/fonts/icons
 @ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:339-421

ERROR in ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./http:/localhost:3000/3a61225d681cdef00a2e236b3a1983fd-Awesomecons.svg in /Users/........../lp_kiosk/src/fonts/icons
 @ ./~/css-loader!./~/fontgen-loader!./src/fonts/icons/icons.font.js 6:458-540

I think the problem is exactly the same.

@mikestopcontinues
Copy link

Same issue. If all it takes to solve is the PR, please merge!

@jzavisek
Copy link

jzavisek commented Sep 9, 2016

Same issue, please merge the PR 🙏

@Bdragon93
Copy link

Hi @IngwiePhoenix
Can you help me merge and release this issue (https://github.com/DragonsInn/fontgen-loader/pull/23/files). I work in a team, so difficult to maintain and waste time to fix directly module after install or deploy :( .
Thank you.

@deeg
Copy link

deeg commented Dec 2, 2016

Is there a work around for this besides merging this PR?

@kumar935
Copy link

kumar935 commented Jan 6, 2017

A workaround I've been using is just using 'embed' property like so:

{
        "test": /\.font\.(js|json)$/,
        "loader": 'style!css!fontgen?embed'
}

which creates data-uri instead of having paths.

@lbineau
Copy link

lbineau commented Jan 8, 2017

@kumar935 That's what I'm using as a workaround but not ideal though.

@jeerbl
Copy link

jeerbl commented Feb 4, 2017

Guys,

I took over the project and fixed some issues as it wasn't being updated. It is here, I renamed it as webfonts-loader so I can push it on npm.

Cheers,
Jerome

@mikestopcontinues
Copy link

Cool, I'll use yours going forward!

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

No branches or pull requests

9 participants