Skip to content

[Documentation] How to use 5.x with Webpack config file? #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
moderndeveloperllc opened this issue Jul 6, 2020 · 4 comments
Closed

Comments

@moderndeveloperllc
Copy link

I think it might be good to include information on how to use ES6 module imports (import {merge} from 'webpack-merge';) in a webpack.config.js file. Just trying to replace the old CommonJS require() doesn't work. From what I can see, you have to route the config file through Bable to change over the imports back to CommonJS.

Am I missing something here?

@bebraw
Copy link
Member

bebraw commented Jul 6, 2020

Available import types depend a lot on the environment. If you do webpack.config.babel.js, I recall it should try to use Babel. With webpack.config.ts, it would go through tsc.

I think I'll rewrite the imports to CommonJS style as that's the lowest common denominator. Thanks!

@bebraw bebraw closed this as completed in 50bf401 Jul 6, 2020
@bebraw
Copy link
Member

bebraw commented Jul 6, 2020

Included in 5.0.4.

@moderndeveloperllc
Copy link
Author

@bebraw Thanks. I think it will cut down on the confusion with those of us who are relative Webpack/node neophytes.

@bebraw
Copy link
Member

bebraw commented Jul 6, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants