<script src="./externals.js"></script>
<script src="./title-component.js"></script>
class Title extends React.Component {
render(){
return <h1>Test</h1>
}
}
resolve: {
alias: {
"react": "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat"
};
}
react: {
root: ['React'],
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
},
'react-dom': {
root: ['ReactDom'],
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom'
},
Any help will be appreciated.
a way to verify that my package is using preact not react
Look at the compiled & un-minified code to see how the components' functions are called:
React: _jsxs()
or React.createElement()
Preact: Preact.h()
( or maybe just h()
? )