Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to force recompile?

See original GitHub issue
  • babel-plugin-preval version: 1.4.1
  • node version: 8.1.3
  • npm (or yarn) version: npm 5.2.0

Relevant code or config

const result = preval`
  const fs = require('fs');
  const path = require('path');
  const content = fs.readFileSync(path.join(__dirname, ''));
  module.exports = content.toString();


What you did: I ran the code above, to export contents of

What happened: when I modify the result of preval didn’t change when I tried to compile it again. Maybe I’m missing something?

Reproduction repository: demo

Problem description: preval probably doesn’t see the reason to recompile because its tagged template literal didn’t change.

Suggested solution: I don’t know. 😅

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:38 (18 by maintainers)

github_iconTop GitHub Comments

kenvunzcommented, Jul 18, 2017

Another workaround is clearing out the babel cache folder (default at ./node_modules/.cache/babel-loader before build, my scripts example

  "scripts": {
    "start": "yarn clear:babel-cache && next",
    "build": "yarn clear:babel-cache next build && next export",
    "clear:babel-cache": "rimraf -rf ./node_modules/.cache/babel-loader/*"
kumar303commented, Feb 1, 2018

Another workaround is clearing out the babel cache folder (default at ./node_modules/.cache/babel-loader) before build

For me this directory did not exist; my default cache was located at ~/.babel.json (file contents are cached in the JSON). Hopefully this comment saves someone the time it took for me to track that down.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to force a full recompilation of all files for every make?
Then you can just run make clean to make sure all files will be rebuilt. But don't force full rebuild all the time,...
Read more >
Force a file to recompile every time
"Clean and build" does force every source file to be recompiled. If you examine the build log you will see an initial step...
Read more >
TN IT233 How to force recompile an Intouch Application
1. Make sure Intouch is shutdown. · 2. Go to your project directory. · 3. Once in the project directory you will need...
Read more >
What does "Force Recompile" do? (Flair : Question) : r/RenPy
In these cases you can run force recompile to force it. Another solution (if you know what file is affected) is to delete...
Read more >
Forcing a VI to Recompile - NI - Support - National Instruments
To force LabVIEW to recompile the current VI without recompiling all of its SubVIs, use the following shortcuts:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found