Giter Club home page Giter Club logo

Comments (5)

mzgoddard avatar mzgoddard commented on June 8, 2024 2

Thank you @adriantoine and @legomushroom for your debug info for IgnorePlugin. Let me know if 0.3.9 does or doesn't work for you.

from hard-source-webpack-plugin.

mzgoddard avatar mzgoddard commented on June 8, 2024 1

Ooop. 0.3.9 will be up in a bit. I left out a bit of code in my last merge.

from hard-source-webpack-plugin.

aaronjensen avatar aaronjensen commented on June 8, 2024

Ah, I was planning on opening an issue to say that CommonsChunkPlugin caused problems w/ HSWP, but it seems this is known. This is unfortunate as it's an important part of optimizing our build. Thanks for HSWP though, it's saved us a ton of time during dev.

from hard-source-webpack-plugin.

adriantoine avatar adriantoine commented on June 8, 2024

I'm having issues while using this plugin with webpack.IgnorePlugin, here's my config:

new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),

and here's the error I get:

/Users/adrien/Projects/tray/website/node_modules/hard-source-webpack-plugin/lib/hard-context-module-factory.js:74
    var identifier = identifierPrefix + module.identifier();
                                              ^

TypeError: Cannot read property 'identifier' of undefined
    at /Users/adrien/Projects/tray/website/node_modules/hard-source-webpack-plugin/lib/hard-context-module-factory.js:74:47
    at /Users/adrien/Projects/tray/website/node_modules/webpack/lib/ContextModuleFactory.js:37:22
    at /Users/adrien/Projects/tray/website/node_modules/tapable/lib/Tapable.js:204:11
    at ContextModuleFactory.cmf.plugin (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/IgnorePlugin.js:28:24)
    at /Users/adrien/Projects/tray/website/node_modules/tapable/lib/Tapable.js:206:14
    at ContextModuleFactory.cmf.plugin (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/IgnorePlugin.js:30:13)
    at ContextModuleFactory.applyPluginsAsyncWaterfall (/Users/adrien/Projects/tray/website/node_modules/tapable/lib/Tapable.js:208:13)
    at ContextModuleFactory.create (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/ContextModuleFactory.js:26:7)
    at next (/Users/adrien/Projects/tray/website/node_modules/hard-source-webpack-plugin/lib/hard-context-module-factory.js:59:15)
    at HardContextModuleFactory.create (/Users/adrien/Projects/tray/website/node_modules/hard-source-webpack-plugin/lib/hard-context-module-factory.js:66:3)
    at iteratorFactory (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:209:12)
    at /Users/adrien/Projects/tray/website/node_modules/webpack/node_modules/async/dist/async.js:3025:16
    at eachOfArrayLike (/Users/adrien/Projects/tray/website/node_modules/webpack/node_modules/async/dist/async.js:941:9)
    at eachOf (/Users/adrien/Projects/tray/website/node_modules/webpack/node_modules/async/dist/async.js:991:5)
    at Object.eachLimit (/Users/adrien/Projects/tray/website/node_modules/webpack/node_modules/async/dist/async.js:3089:3)
    at Compilation.addModuleDependencies (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:190:9)
    at Compilation.processModuleDependencies (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:175:8)
    at _this.buildModule.err (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:315:13)
    at building.forEach.cb (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:125:27)
    at Array.forEach (native)
    at callback (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:125:13)
    at module.build (/Users/adrien/Projects/tray/website/node_modules/webpack/lib/Compilation.js:147:11)
    at /Users/adrien/Projects/tray/website/node_modules/webpack/lib/NormalModule.js:210:10
    at /Users/adrien/Projects/tray/website/node_modules/webpack/lib/NormalModule.js:162:10
    at /Users/adrien/Projects/tray/website/node_modules/loader-runner/lib/LoaderRunner.js:370:3
    at iterateNormalLoaders (/Users/adrien/Projects/tray/website/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
    at Array.<anonymous> (/Users/adrien/Projects/tray/website/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/Users/adrien/Projects/tray/website/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:15)
    at /Users/adrien/Projects/tray/website/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:69:9
    at /Users/adrien/Projects/tray/website/node_modules/graceful-fs/graceful-fs.js:78:16

if I remove the IgnorePlugin, it works.

from hard-source-webpack-plugin.

adriantoine avatar adriantoine commented on June 8, 2024

Hey @mzgoddard, sorry I didn't answer earlier (I couldn't test), it's fixed in v0.3.9, thanks for your works!

from hard-source-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.