juicecube / mlz-pack Goto Github PK
View Code? Open in Web Editor NEWmlz-pack
License: MIT License
mlz-pack
License: MIT License
在配置文件里添加如下配置会导致其它的babel配置出现问题,如antd的样式丢失
babel: {
"plugins": [
["import", {
"libraryName": "@cmao/doraemon",
"camel2DashComponentName": false
}]
]
}
可参考:
按照qiankun官方文档需要修改webpack的output配置,需要支持自定义目录输出
https://qiankun.umijs.org/zh/guide/getting-started#2-%E9%85%8D%E7%BD%AE%E5%BE%AE%E5%BA%94%E7%94%A8%E7%9A%84%E6%89%93%E5%8C%85%E5%B7%A5%E5%85%B7
const packageName = require('./package.json').name;
module.exports = {
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd',
jsonpFunction: `webpackJsonp_${packageName}`,
},
};```
ReactDOM.render(
<App/>,
rootElement,
);
if ((module as any).hot) {
(module as any).hot.accept('./App.tsx', () => {
console.log('hot accept');
ReactDOM.render(
<App/>,
rootElement,
);
});
}
or
if ((module as any).hot) {
(module as any).hot.accept();
}
配置完热更新后,修改文件,只会重新编译一次,且页面没有刷新。后续再修改文件没有重新编译
externals: {
react: 'window.React',
'react-dom': 'window.ReactDOM'
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.