create-react-library
create-react-library copied to clipboard
implementing scss in create-react-library
Hi guys, im trying to implement scss in create-react-library.
`import css from 'rollup-plugin-css-only'
export default { entry: 'entry.js', dest: 'bundle.js', plugins: [css({ output: 'bundle.css' })] }`
this is my rollup.config.js under src/ folder, the problem is it still not working, I also added node-sass but still not working
I was able to get sass working by disabling css-modules and installing node-sass then just editing the root package.json start and build script parameters as below (basically just added --css-modules false to the microbundle-crl):
"scripts": {
"build": "microbundle-crl --no-compress --css-modules false --format modern,cjs",
"start": "microbundle-crl watch --no-compress --css-modules false --format modern,cjs",
"prepare": "run-s build",
"test": "run-s test:unit test:lint test:build",
"test:build": "run-s build",
"test:lint": "eslint .",
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"predeploy": "cd example && npm install && npm run build",
"deploy": "gh-pages -d example/build"
},