rollup-plugin-angular icon indicating copy to clipboard operation
rollup-plugin-angular copied to clipboard

Rollup watch doesn't watch non-ts files

Open nsanitate opened this issue 8 years ago • 3 comments

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.

nsanitate avatar Aug 01 '17 09:08 nsanitate

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

cebor avatar Aug 01 '17 13:08 cebor

A simple workaround watch 'rollup -c' app/

kziemianek avatar Oct 12 '17 19:10 kziemianek

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

jisheedpdm avatar Feb 08 '18 11:02 jisheedpdm