Add doc for sjs-bundler/module users
See original GitHub issueDue to https://github.com/scala-js/scala-js/issues/2797 I cannot support both script-style (@JSName
/@JSGlobal
) and module-style (@JSImport
) in this library.
I’ll keep it as script style for now, probably until SJS 1.0 is released.
In order to use scalajs-react with scalajs-bundler / module-style, the following webpack config is required:
module: {
rules: [{
test: require.resolve('react'),
use: [{loader: 'expose-loader', options: 'React'}]
}, {
test: require.resolve('react-dom'),
use: [{loader: 'expose-loader', options: 'ReactDOM'}]
}],
},
entry: ['react', 'react-dom'],
}
There’s also a demo repo where I have this working with some other features as I experiment with webpack + Scala.JS: https://github.com/japgolly/misc/tree/webpack
Put all this ↑ info in the docs for scalajs-react 1.0.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Facades should be able to support all values of ModuleKind
Put @JSImport on my facades and force users to use CommonJSModule and ... Add doc for sjs-bundler/module users japgolly/scalajs-react#343.
Read more >How to add Document with Custom ID to firestore
To use a custom ID you need to use .set , rather than .add. This creates a document with the ID "LA":
Read more >How to Build the Best User Documentation (New Guide) | Blog
Have a product or service that needs user documentation? Here are some simple tips on how to build the best documentation for consumers....
Read more >Firebase V9 Firestore Add Document Data – addDoc()
Learn how to add data as document to Firebase version 9 Cloud Firestore database using addDoc(), getFirestore() and collection() methods.
Read more >Getting Started with Firebase 9 #5 - YouTube
Hey all, in this Firebase 9 tutorial I'll show you how to add new documents (save them) and also how to delete documents...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can also do something like… I haven’t done it in a while, so it’s probably close to correct. If you don’t want to mess with webpack configs (which breaks the best feature,
enableReloadWorkflow
, imo).This would not be in the library itself, but in the app
Closed via 5169e79a83f7c959f29194f2071f2063ba7846c1 Not huge but it’ll have to do