Comments (14)
Thank you for spending time investigate it. I am actually totally happy to have it compiled twice. Seeing multiple green 'success' displayed on screen makes me feel that my code is rock solid :)
from prettier-loader.
Hi, sorry for so late, it's done in watch-mode-fix branch, but I want to be sure with this, and I would like to take just a couple of days for more testing before merge it to master
from prettier-loader.
Sorry for delay, I could not find a lot of time for solving this problem before.
But I have time on next week, so I think somehow this will be done.
from prettier-loader.
Hi, sorry for late, found this issue just now :) I'll try to do something with it
from prettier-loader.
I'll try to figure out the problem:
user save changes to file -> here comes first compilation
if loader sees that file should be formatted, it overwrites the file -> here comes next compilation
Seems like it's not possible to solve this problem by only loader, according to loader api you can not prevent already started compilation.
But, I think this is where we can create plugin, that prevents second compilation.
And this is what you will add only to your dev config of webpack.
Need more time to solve this problem.
from prettier-loader.
Webpack team add new documentation on loaders api, so it seems like .pitch
should help to solve this problen
I'll take a look in next few days
from prettier-loader.
How the research is going ? Really looking forward it :)
Amazing loader btw, saved me a lot of headaches with pre commit setup inside Docker 👍
from prettier-loader.
Hi ! How is it going ? Looking forward it 😄
from prettier-loader.
@iamolegga hi, will you merge the fix? Maybe publish beta version with the fix to npm?
from prettier-loader.
@Deadly0 I tested this, but had some issues with webpack 4, so that's why I didn't merge it yet. Now I'm on vacation, and I have not access to npm, so more time is required
from prettier-loader.
@iamolegga any luck with this?
from prettier-loader.
Any solution for this?
from prettier-loader.
Hi everyone, first of all, I'm so sorry for making you waiting so much time for solving this.
Last 2-3 days I was working only on this problem trying to solve this old bug. I've read all the webpack API docs, I've tried different ways, but no luck. With current webpack API it seems like it's not solvable.
More over webpack maintainers saying that loaders should not do things like this loader does (webpack/webpack#9763) 🤷♂️
I've looked at other similat projects, but no one has solution.
So I'm going to add this as knowing issue in docs, and closing it for now.
Sorry
from prettier-loader.
Anyone found a good alternative to this?
I am using the package in my project, and wondering what else is out there.
from prettier-loader.
Related Issues (13)
- After build uglify plugin fires exception in every file HOT 8
- Please give me the npm package name 'prettier-loader' HOT 2
- No version 2.2.0 in the Npm software registry.
- How to use with the .prettierrc file HOT 1
- error with babel HOT 3
- prettier.config.js file spesify path webpack HOT 3
- Wrong engine version HOT 6
- Issue with prettier-loader and *.vue files HOT 1
- Disabling prettier-loader when webpack starts HOT 4
- Prettier shouldn't be a dependency HOT 2
- Detect parser automatically
- Ignore/disable prettier didn't works HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-loader.