Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = [
- {
- /*Client Side*/
- entry: './src/App.js',
- output:{
- path: path.resolve(__dirname, 'dist'),
- filename: "2FA.js",
- libraryTarget: 'umd',
- library: '2FA'
- },
- module: {
- rules: [
- {
- test: /.(js|jsx)$/,
- exclude: /node_modules/,
- use: {
- loader: "babel-loader"
- }
- },
- {
- test: /.html$/,
- use: {
- loader: "html-loader",
- options: { minimize: true }
- }
- },
- {
- test: /.css$/,
- use: [MiniCssExtractPlugin.loader,"css-loader"]
- }
- ]
- },
- plugins: [
- new HtmlWebPackPlugin({
- template: "./public/index.html",
- filename:"./index.html"
- }),
- new MiniCssExtractPlugin({
- filename: "[name].css",
- chunkFilename:"[id].css"
- })
- ]
- }
- ]
- export default class TwoFA extends React.Component{
- render() {
- return (
- <div>
- /* All the staff */
- </div>
- );
- }
- }
- import TwoFA from 'my-app/dist/2FA'
- ReactDOM.render(<TwoFA />, document.getElementById('root'));
Add Comment
Please, Sign In to add comment