Comments (6)
@riccardonuzz update rollup-plugin-delete
to 1.1.0 and you can solve it this way:
plugins: [
copy({ ..., hook: 'buildStart' }),
del({ ..., hook: 'buildEnd' })
]
from rollup-plugin-copy.
I don't know if it will help you but in https://github.com/marverix/rollup-plugin-copier you have option hookOn
available.
from rollup-plugin-copy.
In 1.0.0 files are correctly copied in sequential async generateBundle
hook. Other plugins will have access to files when placed after copy
plugin so text replacement or other transformations can be done there.
Try the new version to see if it fits your needs 😉
from rollup-plugin-copy.
I'm using rollup-plugin-delete and placing it after copy plugin but I'm unable to delete files in dist folder. It looks like del plugin runs always before copy plugin.
from rollup-plugin-copy.
@riccardonuzz yes, delete
plugin uses buildStart
hook and copy
uses buildEnd
hook so no matter what order you place plugins, delete will run first, then copy.
There is an option hook where you can set what hook to use, you can try to set it to options
hook which is executed before buildStart
so delete hook will be executed after copy. (don't try to set it to buildStart
and rely on plugins order, this hook runs plugins in parallel and it's a small limitation of current rollup plugin system)
I'll add a hook option to delete plugin too, so you can change it for this case:
- copy -
buildStart
hook - delete -
buildEnd
hook
from rollup-plugin-copy.
Problem solved, thank you! :)
from rollup-plugin-copy.
Related Issues (20)
- Transform only works on first instance of file HOT 1
- Promise support
- Negated patterns doesn't work correctly. HOT 1
- Has anyone been able to get this working in Sveltekit yet? HOT 3
- copy folder structure with flatten=false and ignore first levels HOT 3
- No error if target file does not exist
- The filter won't take effect when file transformed
- (copy plugin) Error: ENOENT: no such file or directory, chmod <filename> HOT 7
- copy occurs before generated bundle write when multi entry HOT 2
- unable to copy dot files from a directory ie. .htaccess HOT 1
- Symlinks HOT 2
- Move `@types/*` to `devDependencies`. HOT 3
- Create symlink instead of copy?
- Not working well in a Laravel project using Vite HOT 2
- The files in src cannot be obtained under the windows system HOT 3
- Rename does not let me alter the folder to which the file is written. HOT 1
- Please add your oss license text HOT 1
- `rename` option does not work in Rollup 4 HOT 1
- Compile typescript HOT 1
- Breaking dependency [email protected] HOT 3
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 rollup-plugin-copy.