-
Notifications
You must be signed in to change notification settings - Fork 3
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
Traduction de build-config.md
#12
Conversation
Signed-off-by: Bruno Lesieur <[email protected]>
build-config
build-config.md
Signed-off-by: Bruno Lesieur <[email protected]>
Signed-off-by: Bruno Lesieur <[email protected]>
Signed-off-by: Bruno Lesieur <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Voici ma review, j'ai pas trouvé grand chose malgré la taille des modifications
en/build-config.md
Outdated
|
||
We will assume you already know how to configure webpack for a client-only project. The config for an SSR project will be largely similar, but we suggest breaking the config into three files: *base*, *client* and *server*. The base config contains config shared for both environments, such as output path, aliases, and loaders. The server config and client config can simply extend the base config using [webpack-merge](https://github.com/survivejs/webpack-merge). | ||
Nous allons suposez que vous savez déjà comment configurer webpack pour un projet uniquement client. La configuration pour un projet avec du SSR va être en grande partie similaire, mais nous vous sugérons de séparer vos configurations en trois fichiers : *base*, *client* et *server*. La configuration de base contient la configuration partagée par les deux environnements, comme les chemins de sortie, les aliases et les loaders. La configuration du serveur et la configuration du client peut simplement étendre la configuration de base en utilisant [webpack-merge](https://github.com/survivejs/webpack-merge). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nous vous suggérons
en/build-config.md
Outdated
output: { | ||
libraryTarget: 'commonjs2' | ||
}, | ||
|
||
// https://webpack.js.org/configuration/externals/#function | ||
// https://github.com/liady/webpack-node-externals | ||
// Externalize app dependencies. This makes the server build much faster | ||
// and generates a smaller bundle file. | ||
// Dépendances aux applications externes. Cela rend le build serveur plus rapide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extériorise les dépendances de l'application
en/build-config.md
Outdated
// you can add more file types here e.g. raw *.vue files | ||
// you should also whitelist deps that modifies `global` (e.g. polyfills) | ||
// ne pas externaliser les dépendances qui ont besoin d'être traitées par webpack. | ||
// vous pouvez ajouter plus de types de fichier comme par ex. ici, avec les fichiers `*.vue` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types de fichier ici, comme par ex.
en/build-config.md
Outdated
|
||
Notice that in the `externals` option we are whitelisting CSS files. This is because CSS imported from dependencies should still be handled by webpack. If you are importing any other types of files that also rely on webpack (e.g. `*.vue`, `*.sass`), you should add them to the whitelist as well. | ||
Notons que dans l'options `externals` nous avons exclus les fichiers CSS. Cela parce que les fichiers CSS importés par dépendances doivent quand même être gérés par webpack. Si vous importez n'importe quels autres types de fichier également pris en charge par webpack (ex : `*.vue`, `*.styl`), vous pouvez également les ajouter à la liste des exceptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dans l'option.
C'est parce que les fichiers CSS importés
*.sass
Signed-off-by: Bruno Lesieur <[email protected]>
Merci @Kocal pour ta relecture ! |
Un peu plus costaux cette partie. À relire plus attentivement, j'ai fatigué sur la fin. Je vais faire une relecture moi même en début d'après midi.