OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Using webpack to make firebase the primary "dependancy" file for the rest of our website

  • Thread starter Thread starter nellyjelly56
  • Start date Start date
N

nellyjelly56

Guest
So I am using webpack to try and make a website, and I want to make my firebase be an entry point that my main javascript file (and the files following) will depend on so that firebase is loaded before the rest of the files

here is what I have:

module.exports = {

Code:
mode: 'development',
entry: {
    firebase: './mainPage/firebase.js',
    main: {
        import:'./mainPage/main.js',
        dependOn: 'firebase.js'
    }, 
    
},
output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js',
    publicPath: '/dist'
},
watch: true

};

I am unsure if

  1. this is the correct way to set up the entry points correctly
  2. if this is the best way to make sure firebase is handled correctly

<p>So I am using webpack to try and make a website, and I want to make my firebase be an entry point that my main javascript file (and the files following) will depend on so that firebase is loaded before the rest of the files</p>
<p>here is what I have:</p>
<p>module.exports = {</p>
<pre><code>mode: 'development',
entry: {
firebase: './mainPage/firebase.js',
main: {
import:'./mainPage/main.js',
dependOn: 'firebase.js'
},

},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/dist'
},
watch: true
</code></pre>
<p>};</p>
<p>I am unsure if</p>
<ol>
<li>this is the correct way to set up the entry points correctly</li>
<li>if this is the best way to make sure firebase is handled correctly</li>
</ol>
 

Latest posts

S
Replies
0
Views
1
Souvik Manna
S
S
Replies
0
Views
1
Shelling ford
S
Top