Rollup watch doesn't watch non-ts files
I'm using a default rollup configuration for develop an Angular 4+ library, but when I make a change to a .html, .scss or .css file, no event is raised for waking up the rollup-watch-plugin and so the building.
Sorry, i do not maintain this plugin for rollup anymore.
See: https://github.com/cebor/rollup-plugin-angular/blob/master/README.md#looking-for-new-maintainer
A simple workaround
watch 'rollup -c' app/
I'm also have the same issue.. If I change typescript files then it is re-generating the .umd modules but if I change .html or .css it is not. Is there any other configuration need to be added in rollup.conf.js?? My rollup.conf.js file is
import typescript from 'rollup-plugin-typescript2'; import alias from 'rollup-plugin-alias'; import resolve from 'rollup-plugin-node-resolve'; import angular from 'rollup-plugin-angular'; import multiEntry from 'rollup-plugin-multi-entry'; import commonjs from 'rollup-plugin-commonjs';
import sass from 'node-sass'; import CleanCSS from 'clean-css'; import { minify as minifyHtml } from 'html-minifier';
const pkg = require('./package.json');
const cssmin = new CleanCSS();
const htmlminOpts = { caseSensitive: true, collapseWhitespace: true, removeComments: true, };
export default {
input: 'src/components//ts/.ts',
output: {
file: 'src/components/bundles/module.umd.js',
format: 'umd',
name: 'ng.Modules'
},
plugins: [
angular({
// additional replace templateUrl and stylesUrls in every .js file
// default: true
replace: false,
preprocessors: {
template: template => minifyHtml(template, htmlminOpts),
style: scss => {
const css = sass.renderSync({ data: scss }).css;
return cssmin.minify(css).styles;
},
}
}),
typescript(),
multiEntry(),
alias({ rxjs: __dirname + '/node_modules/rxjs-es' }),
resolve({
jsnext: true,
main: true,
browser: true
}),
commonjs()
],
external: Object.keys(pkg.dependencies),
globals: {
'@angular/common': 'vendor._angular_common',
'@angular/compiler': 'vendor._angular_compiler',
'@angular/core': 'vendor._angular_core',
'@angular/http': 'vendor._angular_http',
'@angular/platform-browser': 'vendor._angular_platformBrowser',
'@angular/platform-browser-dynamic': 'vendor._angular_platformBrowserDynamic',
'@angular/router': 'vendor._angular_router',
'@angular/forms': 'vendor._angular_forms',
}
}
Scripts I'm using in my package.json file is
"scripts": { "ng": "ng", "watch": "rollup --watch -c", "build": "rollup -c", "serve": "tsc && node app.ts && build", "start": "npm-run-all --parallel watch serve", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" },
@nsanitate @cebor @kziemianek @db6edr @TimMensch