Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
export default class Action extends React.Component {
constructor(props) {
super(props);
this.state = {
val: ''
}
@awareness481
awareness481 / webpack.common.js
Created July 31, 2018 08:05
webpack.prod.js
const path = require('path');
module.exports = {
entry: './src/app.js',
target: 'web',
node: {
fs: 'empty'
},
output: {
path: path.join(__dirname, 'public'),
@awareness481
awareness481 / error.txt
Last active July 31, 2018 08:19
webpack error
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'default'. These properties are valid:
object { mode?, amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, externals?, loader?, module?, name?, node?, output?, optimization?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, serve?, stats?, target?, watch?, watchOptions? }
For typos: please correct them.
For loader options: webpack >= v2.0.0 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/app.js',
target: 'web',
node: {
fs: 'empty'
},
output: {
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
entry: './src/app.js',
target: 'web',
node: {
fs: 'empty'
import React from 'react';
import {
ImageBackground,
StyleSheet,
Text,
TouchableHighlight,
View
} from 'react-native';
import { Font } from 'expo';
const express = require('express');
const http = require('http');
const path = require('path');
const routes = require('./routes');
const app = express();
const server = http.createServer(app);
// view engine
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"barryvdh/laravel-dompdf": "^0.8.1",
"doctrine/dbal": "^2.5",
@awareness481
awareness481 / _reset.scss
Created October 19, 2019 02:03
CSS reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
/*
Reset.scss provided by @hcatlin - https://gist.github.com/hcatlin/1027867
*/
html,
@awareness481
awareness481 / README.md
Last active February 14, 2020 04:27
Slide in background CSS animation on hover