Skip to content

Commit 4e44ce9

Browse files
committed
feat: issue-#158 - insert feat docs
- Simplified the usage notice and added link to 'package.json.files' docs.
1 parent ea8e55c commit 4e44ce9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,17 @@ sass({
9696
**Note:**
9797

9898
The utility function responsible for injecting style chunks into the page's head is output to
99-
`./dist/node_modules/rollup-plugin-sass/dist/...`
99+
`./dist/node_modules/...` (depending on the build tool you're using) when using rollup-plugin-sass's
100+
`insert` feature.
100101

101-
- If publishing a package ensure the above mentioned directory (or similar) is
102-
listed in [`package.json.files`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files) field.
103-
- Additionally, ensure the same directory is not excluded via your build tools (rollup, webpack, etc.),
104-
if you're getting errors related to the `___$insertStyle` function not being present.
102+
Due to this some caveats come up:
103+
104+
1. If you're publishing, and/or packaging-up, an app:
105+
- Ensure the `./{target-dist}/**/node_modules**/insertStyle.js` file is not listed in relevant `.*ignore` files.
106+
- Ensure the `./{target-dist}/**/insertStyle.js` file is listed in [`package.json.files`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files) field.
107+
- Additionally, ensure the same directory is not excluded via your build tools (rollup, webpack, etc.).
108+
- Optionally, if you're using typescript, you can list the `./{target-dist}/**/insertStyle` module
109+
in your `*tsconfig*`.
105110

106111
### `processor`
107112

0 commit comments

Comments
 (0)