babel-plugin-transform-require-ignore | find another way to ignore the extensions for webpack usage | Runtime Evironment library
kandi X-RAY | babel-plugin-transform-require-ignore Summary
kandi X-RAY | babel-plugin-transform-require-ignore Summary
We have to find another way to ignore the extensions for webpack usage and make it work in node environment. Configure it in .babelrc for node, we could ignore the requirement when run test in node or build server render app. Then we run babel with BABEL_ENV=node will active this plugin;. or use with babel-register in require-hooks. Or with cli like other plugin used. Only ignore import './some.less'; or require('./some.less');. If assign to some variable, means that may use css-module, please use instead.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of babel-plugin-transform-require-ignore
babel-plugin-transform-require-ignore Key Features
babel-plugin-transform-require-ignore Examples and Code Snippets
Community Discussions
Trending Discussions on babel-plugin-transform-require-ignore
QUESTION
I am creating a React/Redux App compiled with Babel and bundled by Webpack. I want to implement a plugin feature. So I use Code Splitting with Dynamic import() to divide the main bundle for each plugin. However, if I need the same plugin in many place, Webpack will bundle a bundle for any import() used and iterate it (0.bundle.js, 1.bundle.js, ...). I try to use webpackChunkName: "MyPlugin" in comment in import() thinking that if I import a bunble with the same chunk name, it will replace the other one while bundling, but since I use babel-plugin-dynamic-import-webpack, webpackChunkName don't seem to work anymore. Due to project privacy, I can't provide any testable demo. Any idea?
...ANSWER
Answered 2019-Feb-27 at 21:47I replaced the Dynamic import() by a require.ensure().
QUESTION
ANSWER
Answered 2017-Aug-20 at 14:11figured it out.
It has ' build ' in my .gitignore file.
If so, build directory will also push in github, is there any other way?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install babel-plugin-transform-require-ignore
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page