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

publicPath in webpack.config.js seems to be wrong #24

Open
hubionmac opened this issue Mar 7, 2021 · 0 comments
Open

publicPath in webpack.config.js seems to be wrong #24

hubionmac opened this issue Mar 7, 2021 · 0 comments

Comments

@hubionmac
Copy link

I but my fonts into the asset-folder
e.g:
/themes/mythemename/assets/fonts/open-sans-v18-latin-300.woff

in /themes/mythemename/assets/css/theme.pcsss
I put

font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/open-sans-v18-latin-300.eot'); /* IE9 Compat Modes */
  src: local(''),
       url('../fonts/open-sans-v18-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/open-sans-v18-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
       url('../fonts/open-sans-v18-latin-300.woff') format('woff'), /* Modern Browsers */
       url('../fonts/open-sans-v18-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
       url('../fonts/open-sans-v18-latin-300.svg#OpenSans') format('svg'); /* Legacy iOS */
}

but this results in a wrong path in the output css

  font-weight: 300;

  src: url(themes/mythemenameassets/fonts/open-sans-v18-latin-300.eot); /* IE9 Compat Modes */
.
.
.

but when I change publicPath inside the webpack.config.js to this
publicPath = '/'+ path.join('themes', data.themeName)+'/'
the path turns out fine and so far everything else as well ;-)

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