question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack exports loader support

See original GitHub issue
  • Laravel Mix Version: 0.9.2
  • Node Version (node -v): 7.7.3
  • NPM Version (npm -v): 4.4.4
  • OS: Linux

Description:

Do you plan to support webpack exports loader (https://github.com/webpack-contrib/exports-loader) ?

This could solve some issues with old js library loadings. In my case, i need to import bootstrap 4 alpha 6 modules in dist flavour (to work around es6 minification issues in src flavour ), and - as far as i can see - the only way would be to use exports loader so that local vairables would be exported.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nervocommented, Apr 3, 2017

I’m ok with that, thanks for your answer 😃

Btw, i don’t need to use exports-loader syntax in my imports if i define them in autoload. Giving the same example:

import 'bootstrap/js/dist/util';
import 'bootstrap/js/dist/tooltip';

One more thing: what about adding such an example in the autoload documentation ?

1reaction
nervocommented, Mar 30, 2017

@JeffreyWay Nothing at all 😃

But as you add a kind of abstraction layer over webpack’s ProvidePlugin on Api.js autoload function, i wonder if you plan to extend its functionnalities to avoid ugly things like

mix
    ...
    .autoload({
        ...
        'exports-loader?Util!bootstrap/js/dist/util': ['Util'],
        'exports-loader?Tooltip!bootstrap/js/dist/tooltip': ['Tooltip']
    })
Read more comments on GitHub >

github_iconTop Results From Across the Web

exports-loader - webpack
Disclaimer: exports-loader is a third-party package maintained by community members, it potentially does not have the same support, security policy or license ...
Read more >
Why does the "exports-loader" example in Webpack's ...
Getting this to work with a global exports-loader configuration. I have this working with the following setup: src/deps.js // this file just ...
Read more >
exports-loader - webpack 3 documentation
exports loader module for webpack. Requirements. This module requires a minimum of Node v6.9.0 and Webpack v4.0.0. ... npm install exports-loader --save-dev.
Read more >
export-loader - npm Package Health Analysis - Snyk
a webpack loader that allows to write Golang style exports as ES6 modules: all uppercase declarations get exported automatically for you. usage.
Read more >
Learn Webpack Pt. 3: Imports, Exports, & Webpack Modules
Quickly we move on to installing Webpack, configuring it, and adding loaders for CSS, SASS, HTML, and Files. The course covers cache busting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found