Comments (2)
Could you provide your code example here? I can help you then
from react-redux-typescript-boilerplate.
I was able to get dynamic import working with the below code and changing the target and module settings in tsconfig.json to esnext
. However, something with that change breaks the production css extraction and results in an empty style.css
file. Not sure what is causing that though.
Change main.tsx to:
ReactDom.render(
<div>
<button onClick={e => import('app/utils/print').then(module => {
module.default();
})}>Click me and look at the console!</button>
</div>,
document.getElementById('root')
);
print.ts in app/utils/print
:
console.log('The print.ts module has loaded! See the network tab in dev tools...');
export default () => {
console.log('Button Clicked: Here\'s "some text"!');
}
from react-redux-typescript-boilerplate.
Related Issues (20)
- npm install error HOT 1
- Contribute react-redux typings to DTS
- outdated dependencies HOT 1
- Ready for production? HOT 6
- Typescript compilation failures HOT 1
- Do you have any sample for API integrations using NodeJs? HOT 2
- Install with yarn HOT 4
- Cannot find Component in react-redux.d.ts HOT 4
- Upgrade to babel 7 HOT 3
- Remove deprecated repo of React Router Redux HOT 2
- Demo not working HOT 1
- run by docker HOT 1
- [HOW] React Hot Loader integrating
- Can you please give an example for API action with redux-action? HOT 2
- unable to include css and js HOT 1
- Replace webpack-cleanup-plugin HOT 3
- Add husky HOT 1
- Update dependencies HOT 1
- VSCode HOT 1
- Issue with router. It uses relative paths. Getting error: `expected expression, got '<'` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-redux-typescript-boilerplate.