DEV Community

Cover image for I maintain webpack, ask me anything!
Sean Larkin
Sean Larkin

Posted on

I maintain webpack, ask me anything!

I'm Sean,

I maintain webpack.

I work on Microsoft Edge DevTools.

I love 🐔s.

Ask.

Me.

Anything.

:-D

Latest comments (112)

Collapse
 
rtteal profile image
Taylor Teal

What do you think about using webpack for backend express apps? Is there a compelling reason to do this or not to?

Collapse
 
binyamin profile image
Binyamin Green

Using and customizing webpack can be very confusing for beginners. Why do you think that is? What can we as a community do to help them?

Collapse
 
kiransiluveru profile image
kirankumar

when I add new plugin to webpack dev config file javascript heap out of memory error is getting?
what do I do?

Collapse
 
zachcervi profile image
Zach Cervi

How can you conditionally load two different sass styles from webpack? Is it possible? I am trying to perform AB testing with two different stylesheets.

Condition A {
Load style A}
Else {
Load style B
}

Collapse
 
antonpilyak profile image
AntonPilyak

Hi Sean! I'm trying to write a plugin (or loader) for Webpack, but think that I'm stuck in trying to understand hooks and compilation stages. Could you please help me with this question: stackoverflow.com/questions/539367...
I would be extremely grateful!

Collapse
 
xyuri profile image
x-yuri

Hey Sean, what exactly is Webpack's manifest? How can I see it? I'm trying to understand why I should move runtime into a separate chunk (optimization.runtimeChunk = 'single'). And can't reproduce this case where content hash changes with each build, with no changes in the project files. webpack.js.org/guides/caching/#out...

Collapse
 
lizziekarr profile image
Lizzie Karr • Edited

Hi Sean! Thanks for being open to questions <3

I'm trying to use an a tag to download a .rdp file. This works fine with an image but not with the file I need. Do you know if there's a webpack loader that can accept .rdp ?

Thank you!


<a :href='../assets/access.rdp' download>Remote Desktop</a>

Collapse
 
thelarkinn profile image
Sean Larkin

There might be, but if there's not you could always write one and then open source it to webpack-contrib!!! webpack.js.org/API/loaders

Collapse
 
xybin1990 profile image
Nic • Edited

hi,Sean.
i use DllPlugin to produces bundle.dll.js and put it on cdn.
then,i use externals extract the library,but there is an error i dont understand

  • webpack.bundle.dll.js
const webpack = require('webpack');
const path = require('path');

module.exports = {
    entry: {
        bundle: [
            'vue',
            'vuex',
            'axios',
            "vue-router"
        ],
    },
    output: {
        path: path.join(__dirname, 'dll'),
        filename: '[name].dll.js'
    },
    plugins: [
        new webpack.DllPlugin({
            path: path.join(__dirname, 'dll', '[name]-manifest.json'),
            name: '[name]',
        }),
        new webpack.optimize.UglifyJsPlugin({
            beautify: false,
            comments: false,
            compress: {
                warnings: false,
                drop_console: true, //no console
            }
        }),
    ]
};
  • webpack.config.js
externals: {
    'vue': 'vue',
     "vuex": 'vuex',
     'axios': 'axios',
     'vue-router': 'vue-router'
},
new webpack.DllReferencePlugin({
      context: path.join(__dirname),
      manifest: require('./dll/bundle-manifest.json')
})

the error

index.min.js?b40cc7a554404568b02b:2844 Uncaught ReferenceError: vue is not defined
    at Object.<anonymous> (index.min.js?b40cc7a554404568b02b:2844)
    at __webpack_require__ (index.min.js?b40cc7a554404568b02b:689)
    at fn (index.min.js?b40cc7a554404568b02b:110)
    at Object.<anonymous> (index.min.js?b40cc7a554404568b02b:5096)
    at __webpack_require__ (index.min.js?b40cc7a554404568b02b:689)
    at fn (index.min.js?b40cc7a554404568b02b:110)
    at Object.<anonymous> (index.min.js?b40cc7a554404568b02b:13318)
    at __webpack_require__ (index.min.js?b40cc7a554404568b02b:689)
    at module.exports (index.min.js?b40cc7a554404568b02b:790)
    at index.min.js?b40cc7a554404568b02b:793
Collapse
 
yanlee26 profile image
Frank_lyan

Hi Sean!
What's your incentive to write JS for webpack? It's really comprehensive and compelling work!

Collapse
 
thelarkinn profile image
Sean Larkin

Because I love the entire user experience behind it. I love its complete extensibility. To me its a specimin case study of event driven architecture, along with a complete pluggable system (internally and externally).

Those things are really interesting to me. I also love getting people to contribute, and be involved and have a sense of feeling and fellowship.

Collapse
 
yanlee26 profile image
Frank_lyan

Thanks, and I wonder how can I gain the compelling programming skills like you? Haha...

Thread Thread
 
thelarkinn profile image
Sean Larkin

Study the things you love obsessively and teach people about it! Blog, share, present, give talks. :)

Thread Thread
 
yanlee26 profile image
Frank_lyan

Exactly, but sometimes I find time is too short and work is too busy. Maybe I need implement more useful ideas about time management, I will be more than gratitude if you give me some tips in detail . Thanks Sean!

Collapse
 
chrzx74 profile image
Chris Nuvoli

I hope this webpack thing burns in hell as soon as possible.

Collapse
 
thelarkinn profile image
Sean Larkin

Sorry ;-) Not likely anytime soon. Happy to help you learn anyways XD

Collapse
 
belhassen07 profile image
Belhassen Chelbi

If I want to start contributing to open source projects (with front-end technologies) what projects do you suggest I can start contributing to? any advices?

Collapse
 
thelarkinn profile image
Sean Larkin

Suggest something that interests you! Open Source is the most enjoyable when you are passionate about the project you contribute to!

Collapse
 
barryblando profile image
Barry⚡

Hi Sean, what can you say about the new module bundler parcel? their benchmarks are really convincing.

Collapse
 
thelarkinn profile image
Sean Larkin

I'd say show me an optimized webpack build against a parcel build and let's see real benchmarks.

For what it's worth, there is no transparent information about that benchmark they post.

However I have created a benchmark that I hope more people contribute too that actually showcases some initial numbers. github.com/TheLarkInn/bundler-perf...

Collapse
 
renannobile profile image
Renan Lourençoni Nobile

Hi Sean,

I'm a simple Angular dev and I've been using it for the last year.

Most of the projects I've worked (a total of 5 or 6), do use We pack, specially Angular-CLI projects.

Although I have seen webpack, I have no idea what it actually is.

Can you explain it to me and, give me some insight on how I can learn it to improve the projects in working on?

Thank you very much.

Collapse
 
imanhodjaev profile image
Sultan Iman

Do you plan so simplify webpack on configuration part it always feels over engineered?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.