Skip to content
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

Merged
merged 7 commits into from
Jun 5, 2017
Merged

Traduction de build-config.md #12

merged 7 commits into from
Jun 5, 2017

Conversation

MachinisteWeb
Copy link
Member

@MachinisteWeb MachinisteWeb commented Jun 3, 2017

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.

@MachinisteWeb MachinisteWeb changed the title Traduction de build-config Traduction de build-config.md Jun 3, 2017
@MachinisteWeb MachinisteWeb requested a review from Kocal June 3, 2017 10:37
@MachinisteWeb MachinisteWeb self-assigned this Jun 3, 2017
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Copy link
Member

@Kocal Kocal left a 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


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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nous vous suggérons

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
Copy link
Member

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

// 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`
Copy link
Member

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.


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.
Copy link
Member

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 <bruno.lesieur@gmail.com>
@MachinisteWeb
Copy link
Member Author

Merci @Kocal pour ta relecture !

@MachinisteWeb MachinisteWeb merged commit 55310c3 into working Jun 5, 2017
@MachinisteWeb MachinisteWeb deleted the build-config branch June 5, 2017 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants