How to use the webpack-virtual-modules.prototype function in webpack-virtual-modules

To help you get started, we’ve selected a few webpack-virtual-modules examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github folio-org / stripes-core / test / webpack / stripes-config-plugin.spec.js View on Github external
beforeEach(function () {
      this.sandbox.stub(stripesModuleParser, 'parseAllModules').returns({ config: 'something', metadata: 'something' });
      this.sandbox.stub(VirtualModulesPlugin.prototype, 'writeModule').returns({});
      this.sandbox.stub(stripesSerialize, 'serializeWithRequire').returns({});
      this.sut = new StripesConfigPlugin(mockConfig);

      compilerStub.plugins = [];

      const translationPlugin = new StripesTranslationsPlugin({ config: {} });
      translationPlugin.allFiles = { en: '/translations/stripes-core/en.json' };
      compilerStub.options.plugins.push(translationPlugin);

      const brandingPlugin = new StripesBrandingPlugin({});
      brandingPlugin.serializedBranding = JSON.stringify({ logo: { alt: 'Future Of Libraries Is Open' } });
      compilerStub.options.plugins.push(brandingPlugin);

      this.sut.apply(compilerStub);
    });

webpack-virtual-modules

Webpack Virtual Modules

MIT
Latest version published 7 months ago

Package Health Score

81 / 100
Full package analysis

Popular webpack-virtual-modules functions