Comments (7)
Can you provide Example - what the need of allChunks
options?
The only issue I know in current instance per module
solution is I need to combine css
manually as like here https://github.com/istarkov/react-components-markdown/blob/master/package.json#L9
cat *.css > combined.css
Please explain what the problem with allChunks: true
? (I don't understand this option)
I can't use single webpack instance, please read comment here https://github.com/istarkov/babel-plugin-webpack-loaders/blob/master/src/runWebPackSync.js#L16
(It's possible to use single instance with fibers and like library - as at this fork https://github.com/morlay/babel-plugin-webpack-loaders-inline-exports but I prefer not to use such hacks)
from babel-plugin-webpack-loaders.
I created webpack loader and plugin translate-maker-loader for locales (i18n).
The functionality is very similar to css modules.
The main idea is to combine files like
locale/en_US.js
export default {
next: 'Next',
onlyInEnglish: 'Only in english',
}
and
locale/sk_SK.js
export default {
next: 'Dalej',
onlyInSlovak: 'Only in slovak',
}
into the file via your plugin (example of the loader output)
module.exports = {
moduleName__next: {
next: 'moduleName__next'
}
};
but at the end I need to extract and combine multiple language files via plugin and I am not able to use simple en_US.js > /final/en_US.js because I have something like this:
/final/en_US.js
module.exports = {
moduleName__next: {
next: 'Next',
onlyInEnglish: 'Only in english',
onlyInSlovak: 'Only in slovak'
}
}
I am storing all data from the loader into the plugin during the process.
And it is not possible in this moment because I will always get locale only for the current module.
from babel-plugin-webpack-loaders.
Looks like it's impossible without some outer process store for loaders data with current solution.
Imho you can do this combine as some post step as like as with css above. Because I can't use single webpack instance because of sync-async problems.
from babel-plugin-webpack-loaders.
I moved my plugin into the config file for the client(browser) bundle. There is the Webpack as "singleton".
Maybe you can write about this into the documentation too. Anyway thank you for the fast response.
from babel-plugin-webpack-loaders.
The problem with documentation that documentation does not exists for this project ;-)
All documentation is How it works
+ examples
+ tests
+ issues
now
from babel-plugin-webpack-loaders.
indead :)
from babel-plugin-webpack-loaders.
Any product that needs a manual to work is broken. (c) Elon Musk
from babel-plugin-webpack-loaders.
Related Issues (20)
- Quesiton: "ES" build for webpack 2 tree shaking compatibility HOT 13
- Missing documentation or context about being usable for backend purposes only HOT 14
- "Cannot find module" on Windows 10 HOT 4
- CSS Composes/from paths not resolved HOT 1
- Error: provided an invalid property of "config" HOT 4
- Does not run webpack loader on files imported from node modules HOT 1
- Error using worker-loader plugin HOT 3
- Cannot specify NODE_PATH HOT 2
- can't install the plugin with webpack 2 HOT 3
- Supporting additional webpack module api's HOT 3
- Can't resolve jsx files on despite of loader is present HOT 4
- Error SCSS file HOT 2
- NPM doesn't have correct github repo or latest release HOT 3
- Use loader-runnner instead of exec HOT 2
- Using with Webpack 2 (updated config) HOT 3
- License? HOT 2
- webpack 3? HOT 4
- Some webpack plugins are not run HOT 3
- Whitespace in Windows 10 path possible workaronud
- Weird ReferenceError when using a custom webpack loader HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-webpack-loaders.