Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = ({ config, mode }) => {
const baseConfig = require('@instructure/ui-webpack-config')
config = merge(config, baseConfig)
// need to override this instead of merge for these...
config.module.rules = baseConfig.module.rules
config.optimization = require('@instructure/ui-webpack-config/config/optimization')
if (process.env.NODE_ENV === 'production') {
config.devtool = 'none'
}
console.log(`Building Storybook with React version ${React.version}...`)
if (parseFloat(React.version) < 16) {
console.error('Storybook requires React > 16. Run `yarn install:react:16` before running `yarn start:examples`.')
}
return config
}
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
module.exports = require('@instructure/ui-webpack-config').module.rules