What's new in v2.2.2
There is a breaking change in component declaration. Check below:
import { Component } from '@plumejs/core';
// import stylesheet in ts file
import componentStyles from './styles.scss';
@Component({
selector: 'my-comp',
styles: componentStyles // older styleUrl is renamed to styles
})
...The above change enable watch on stylesheets which is not available in older versions.
Documentation will be updated after testing and after release of new version.
If you want to change scss to css/less, check your typings.d.ts file and update module *.scss to *.css/less.
The above implementation will break existing unit tests. To fix them,
- run
npm i -D jest-transform-stub - add
{
...
moduleFileExtensions: ['ts', 'html', 'js', 'json'],
moduleNameMapper: {
"^.+.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
}
}to your jest.config.js