File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,29 @@ export default {
3232 * non-builtin CommonJS modules in Node correctly.
3333 */
3434 interop : 'defaultOnly' ,
35+ /**
36+ * This is required to prevent the error:
37+ *
38+ * TypeError: createContext only works in Client Components.
39+ * Add the "use client" directive at the top of the file to use it.
40+ *
41+ * -----
42+ *
43+ * Here is the Rollup documentation on `banner`:
44+ * A string to prepend/append to the bundle. You can also
45+ * supply a function that returns a Promise that resolves
46+ * to a string to generate it asynchronously
47+ *
48+ * (Note: banner and footer options will not
49+ * break sourcemaps).
50+ */
51+ banner : "'use client';" ,
3552 } ,
3653 {
3754 dir : 'dist' ,
3855 format : 'cjs' ,
3956 exports : 'named' ,
57+ banner : "'use client';" ,
4058 } ,
4159 ] ,
4260 plugins : [
You can’t perform that action at this time.
0 commit comments