This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
webpack_complete_webdevelopment_config [2018/02/05 20:17] – [Slide 5] admin | webpack_complete_webdevelopment_config [2018/02/05 22:48] (current) – [Slide 3] admin | ||
---|---|---|---|
Line 24: | Line 24: | ||
* Define " | * Define " | ||
* Workspace will be linked to ./ | * Workspace will be linked to ./ | ||
- | * Dependenies | + | * Dependencies |
* Centralize/ | * Centralize/ | ||
+ | * Compatible with NPM but creates a yarn.lock file | ||
+ | * Commands are slightly different than NPMs (e.g. yarn add packageName) | ||
<code bash Commands> | <code bash Commands> | ||
Line 114: | Line 116: | ||
* @type string | * @type string | ||
*/ | */ | ||
- | const corePluginBase = './Packages/ | + | const corePluginBase = './node_modules/ |
const corePluginTarget = ' | const corePluginTarget = ' | ||
Line 169: | Line 171: | ||
cssTemplateFontPath: | cssTemplateFontPath: | ||
dest: { | dest: { | ||
- | fontsDir: | + | fontsDir: |
stylesDir: path.resolve(corePluginBase, | stylesDir: path.resolve(corePluginBase, | ||
outputFilename: | outputFilename: | ||
Line 266: | Line 268: | ||
module.exports = { | module.exports = { | ||
entry: { | entry: { | ||
- | script: [corePluginTarget | + | script: [corePluginBase |
}, | }, | ||
output: { | output: { | ||
Line 273: | Line 275: | ||
}, | }, | ||
resolve: { | resolve: { | ||
- | extensions: [' | + | extensions: [' |
+ | modules: [ | ||
+ | path.resolve('./ | ||
+ | | ||
}, | }, | ||
watchOptions: | watchOptions: | ||
- | ignored: ["Styleguide/**/*", "node_modules/**/*"] | + | ignored: [ /Styleguide/, / |
}, | }, | ||
module: { | module: { | ||
Line 311: | Line 316: | ||
plugins: pluginConfig | plugins: pluginConfig | ||
}; | }; | ||
- | |||
</ | </ | ||
+ | |||
+ | ===== The Good, the Bad ... ===== | ||
+ | |||
+ | * **Yarn** | ||
+ | * Workspaces | ||
+ | * Smart caching (??) | ||
+ | * Works flawlessly with existing package.json | ||
+ | * **Webpack**: | ||
+ | * Webpack lets you use require() on local " | ||
+ | * https:// |