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

Static assets are not generated on second build #537

Open
Intrepidd opened this issue Oct 28, 2020 · 1 comment
Open

Static assets are not generated on second build #537

Intrepidd opened this issue Oct 28, 2020 · 1 comment

Comments

@Intrepidd
Copy link

Expected Behavior

When re-building, static assets (app/javascript/images/xxx.png) should be built

Actual Behavior

Such assets are not built, similar to #378

Is an error being thrown?

No error is being thrown, build succeeds.

Steps to Reproduce

I'm using rails with webpacker, no crazy configuration.

My images are imported : require.context('../images', true)

Then in the layout when trying to link the favicons the asset is not found : asset_pack_url('media/images/apple-touch-icon.png')

Operating System, Node, and NPM dependency versions

Mac OS 10.15.7
Node v14.13.1

  "dependencies": {
    "@babel/core": "^7.12.3",
    "@babel/preset-typescript": "^7.12.1",
    "@rails/actioncable": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.2.1",
    "@typeform/embed": "^0.25.4",
    "@types/chart.js": "^2.9.27",
    "@types/turbolinks": "^5.2.0",
    "@types/typeform__embed": "^0.22.2",
    "@uppy/aws-s3-multipart": "^1.8.6",
    "@uppy/core": "^1.13.2",
    "@uppy/dashboard": "^1.12.8",
    "@uppy/locales": "^1.16.8",
    "chart.js": "^2.9.4",
    "core-js": "3",
    "react-is": "^17.0.1",
    "stimulus": "^1.1.1",
    "tailwindcss": "^1.9.6",
    "turbolinks": "^5.2.0",
    "typescript": "^4.0.5",
    "webpack": "^4.44.2",
    "webpack-bundle-analyzer": "^3.9.0"
  },
  "version": "0.1.0",
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^4.6.0",
    "@typescript-eslint/parser": "^4.6.0",
    "eslint": "^7.12.1",
    "hard-source-webpack-plugin": "^0.13.1",
    "webpack-dev-server": "^3.11.0"
  },

@Sociosarbis
Copy link

As mentioned in #517, may be HardSourceWebpackPlugin.ExcludeModulePlugin can help.

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

2 participants