Skip to content

Commit

Permalink
Replace rollup-plugin-styles with ´rollup-plugin-sass` (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp authored Nov 11, 2024
1 parent 13365de commit 92f4532
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1,153 deletions.
4 changes: 2 additions & 2 deletions ember-basic-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
"node-sass": "^9.0.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.21.1",
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-sass": "^1.13.2",
"rsvp": "^4.8.5",
"typescript": "^5.5.4",
"webpack": "^5.94.0"
Expand Down
27 changes: 22 additions & 5 deletions ember-basic-dropdown/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { babel } from '@rollup/plugin-babel';
import { Addon } from '@embroider/addon-dev/rollup';
import styles from 'rollup-plugin-styles';
import sass from 'rollup-plugin-sass'
import postcss from 'postcss';

const addon = new Addon({
srcDir: 'src',
Expand All @@ -16,10 +17,26 @@ export default [
assetFileNames: '[name][extname]',
},
plugins: [
styles({
mode: ['extract', 'ember-basic-dropdown.css'],
}),
],
sass({
output: './vendor/ember-basic-dropdown.css',
})
]
},
{
input: './_index.scss',
output: {
file: './vendor/ember-basic-dropdown.js',
assetFileNames: '[name][extname]',
},
plugins: [
sass({
processor: css => postcss()
.process(css, {
from: undefined,
})
.then(result => result.css)
})
]
},
{
// This provides defaults that work well alongside `publicEntrypoints` below.
Expand Down
Loading

0 comments on commit 92f4532

Please sign in to comment.