-
Notifications
You must be signed in to change notification settings - Fork 71
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
Can't use this plugin with rollup watch #6
Comments
I got over that one in the |
In my opinion that's ok, if it's pointed out in the documentation. the d.ts files are meta information, that append the usual information. It's not that cool, that the d.ts changes get ignored, but it's actually something I personally could work with. The most important thing is to tell it straight forward in the documentation. Maybe there'll be an option for this in the future, or the guys from rollup know a possible solution? |
Could you try with master branch to see if it behaves reasonably? |
I just tried master with --watch and I get Compiles correctly but with similar error to above on file change on |
@brandom: what's your rollup config look like? I'm trying to detect watch mode by counting targets, maybe you don't have any defined... |
Rollup config export default {
format: "iife",
sourceMap: true,
plugins: [
typescript({
typescript: require("typescript")
}),
node({
jsnext: true,
main: true,
browser: true
}),
commonjs(),
babel({
babelrc: false,
exclude: "node_modules/**",
presets: [
"es2017",
"es2016",
[
"es2015",
{
modules: false
}
]
],
plugins: ["lodash", "external-helpers"]
})
],
external: []
}; And then spawning --watch from within gulp function devBundle(cb) {
let rollup = spawn("./node_modules/.bin/rollup", [
"-c",
"rollup.config.dev.js",
"--watch",
"--input",
"./components/app/App.ts",
"--output",
`./dist/js/${jsFileName}`
]);
rollup.stderr.on("data", data => rollupLog(data));
return rollup;
} |
Ok, your config should work with master now I think (or at least get to the next bug :)). I'm still seeing weird ignoring of bad edits in index file (while correct errors show up for edits in other files), so this is not quite ready for npm release. |
@ezolenko Thanks, I will try to find some time to do some additional testing this weekend. |
When using rollup in watch mode (rollup --watch) this plugin will allow the first build but no following one. Each time I change a file it tells me:
The file does not exist, but I guess it's the hash of the new file. In this scenario, I changed some code in src/gl/gl.tsx, which lead to the rebuild.
Stopping rollup --watch and rerunning it generates a valid bundle, but every following build afterwards are breaking as well.
I'm using rollup 0.41.5, rollup-plugin-typescript2 0.3.0 and node 6.9.1
The text was updated successfully, but these errors were encountered: