From 55e9a2f2b1ba4581ed0095bfac164ca7bf5b6a2e Mon Sep 17 00:00:00 2001 From: flashsnake-so Date: Sun, 28 Aug 2016 22:43:21 -0700 Subject: [PATCH 1/2] Issue #27: Error: Cannot find module '<>'] code: 'MODULE_NOT_FOUND' - revise the README.md file --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ab5943..33acb1f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ plugins: [ ] ``` -* In the `custom` property of either your `s-project.json` or `s-function.json` add an webpack property. The configPath is relative to the project root. +* In the `custom` property of either your `s-project.json` or `s-function.json` add an webpack property. The configPath is relative to the webpack.config.js file. ```javascript { @@ -40,6 +40,20 @@ plugins: [ ``` +for example: +```javascript +{ + ... + "custom": { + "webpack": { + "configPath": "/webpack.config.js" + } + } + ... +} + +``` + ## Webpack config This plugin allows you to completely customize how your code is optimized by specifying your own webpack config. Heres a sample `webpack.config.js`: From d0bb392fee02060f9beed097ab53a3019fd0f767 Mon Sep 17 00:00:00 2001 From: flashsnake-so Date: Mon, 29 Aug 2016 00:34:54 -0700 Subject: [PATCH 2/2] Issue #27: Error: Cannot find module '<>'] code: 'MODULE_NOT_FOUND' - revise the README.md file --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 33acb1f..d22f98d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,13 @@ for example: ## Webpack config -This plugin allows you to completely customize how your code is optimized by specifying your own webpack config. Heres a sample `webpack.config.js`: +This plugin allows you to completely customize how your code is optimized by specifying your own webpack config. Make sure to have these dependencies. + +``` +npm install babel-preset-es2015 babel-preset-stage-0 json-loader babel-loader --save-dev +``` + +Heres a sample `webpack.config.js`: ```javascript var webpack = require('webpack'); @@ -87,9 +93,13 @@ module.exports = { ], module: { loaders: [ + { + test: /\.json$/, + loader: 'json-loader' + }, { test: /\.jsx?$/, - loader: 'babel', + loader: 'babel-loader', exclude: /node_modules/, query: { presets: ['es2015', 'stage-0']