mzgoddard / hard-source-webpack-plugin

https://www.npmjs.com/package/hard-source-webpack-plugin
ISC License
2.71k stars 160 forks source link

When cache exist font not included into build with nuxt #357

Closed aldarund closed 6 years ago

aldarund commented 6 years ago

Expected Behavior

fonts included.

Actual Behavior

fonts not included. On first build when there no cache fonts included as they should be. On second build -> font folder not created and no fonts copied.

Is an error being thrown?

No.

Steps to Reproduce

I have a nuxtjs project. And it have a reference to a @mdi/font relevant section from nuxt.config

  css: [
    '~/assets/style/app.styl',
    '@mdi/font/css/materialdesignicons.min.css'
  ],
  ....
   build: {
    extend(config, ctx) {
      const HardSourceWebpackPlugin = require('hard-source-webpack-plugin')
      config.plugins.push(new HardSourceWebpackPlugin())
    }
  }

Operating System, Node, and NPM dependency versions

Windows 10
Node 10.0.2

"dependencies": {
    "@mdi/font": "2.4.85",
    "lodash-webpack-plugin": "0.11.5",
    "nuxt-edge": "2.0.0-25452542.7f9d16c",
    "vue": "2.5.16",
  },
  "devDependencies": {
    "@sentry/webpack-plugin": "1.5.2",
    "babel-eslint": "8.2.3",
    "babel-plugin-lodash": "3.3.2",
    "chance": "1.0.16",
    "copyfiles": "2.0.0",
    "cross-env": "5.1.6",
    "cssnano": "3.10.0",
    "cypress": "2.1.0",
    "eslint": "4.19.1",
    "eslint-config-prettier": "2.9.0",
    "eslint-config-standard": "11.0.0",
    "eslint-loader": "2.0.0",
    "eslint-plugin-chai-friendly": "0.4.1",
    "eslint-plugin-cypress": "2.0.1",
    "eslint-plugin-import": "2.12.0",
    "eslint-plugin-node": "6.0.1",
    "eslint-plugin-prettier": "2.6.0",
    "eslint-plugin-promise": "3.8.0",
    "eslint-plugin-standard": "3.1.0",
    "eslint-plugin-vue": "4.5.0",
    "eslint-plugin-you-dont-need-lodash-underscore": "6.3.1",
    "glob-all": "3.1.0",
    "hard-source-webpack-plugin": "0.7.2",
    "prettier": "1.13.0",
    "purgecss-webpack-plugin": "1.1.0",
    "stylus": "0.54.5",
    "stylus-loader": "3.0.2",
    "vue-eslint-parser": "2.0.3"
  }
jamalsoueidan commented 6 years ago

Did you find a solution?

aldarund commented 6 years ago

Nope, not using it for now because of this...

jamalsoueidan commented 6 years ago

Okay I will just use cache-loader with happyPackMode,!

I will continue using hard-source for my dll generation!

Thank you for fast reply :)