Skip to content

Commit

Permalink
No babel errors or conflicts with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Jan 26, 2018
1 parent 57969b4 commit 5a56ec6
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 26 deletions.
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

21 changes: 19 additions & 2 deletions config/webpack/webpack.test.config.js
Expand Up @@ -13,8 +13,25 @@ module.exports = {
{
test: /\.(js)$/,
exclude: /node_modules/,
use: ['babel-loader']
},
use: {
loader: 'babel-loader',
options: {
presets: ['env', 'stage-0', 'react'],
plugins: [
'transform-class-properties',
[
'transform-runtime',
{
helpers: false,
polyfill: false,
regenerator: true,
moduleName: 'babel-runtime'
}
]
]
}
}
}
]
}
}
7 changes: 3 additions & 4 deletions demo/dist/index.html
Expand Up @@ -5,10 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>React</title>
<link href="assets/prism.css" rel="stylesheet" />
</head>
<link href="demo.0e7ede69.css" rel="stylesheet"></head>
<body>
<div id="demo"></div>
<script src="assets/prism.js"></script>
<script type="text/javascript" src="demo.ee9b663c.js"></script></body>
<script>!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,u){for(var i,a,f,l=0,s=[];l<r.length;l++)a=r[l],t[a]&&s.push(t[a][0]),t[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=o(o.s=u[l]);return f};var r={},t={1:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,o.nc&&u.setAttribute("nonce",o.nc),u.src=o.p+""+({0:"demo"}[e]||e)+"."+{0:"e60760d5"}[e]+".js";var i=setTimeout(a,12e4);function a(){u.onerror=u.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return u.onerror=u.onload=a,c.appendChild(u),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.oe=function(e){throw console.error(e),e}}([]);</script>
<script type="text/javascript" src="demo.e60760d5.js"></script></body>
</html>
17 changes: 16 additions & 1 deletion nwb.config.js
@@ -1,11 +1,26 @@
module.exports = {
type: 'react-component',
babel: {
presets: ['env', 'stage-0', 'react'],
plugins: [
'transform-class-properties',
[
'transform-runtime',
{
helpers: false,
polyfill: false,
regenerator: true,
moduleName: 'babel-runtime'
}
]
]
},
npm: {
esModules: true
// umd: {
// global: 'ReactForm',
// externals: {
// react: 'React',
// react: 'React'
// }
// }
}
Expand Down
10 changes: 3 additions & 7 deletions package.json
@@ -1,15 +1,11 @@
{
"name": "react-form",
"version": "2.16.1",
"description": "React Form is a lightweight framework and utility for building powerful forms in React applications.",
"description":
"React Form is a lightweight framework and utility for building powerful forms in React applications.",
"main": "lib/index.js",
"module": "es/index.js",
"files": [
"css",
"es",
"lib",
"umd"
],
"files": ["css", "es", "lib", "umd"],
"scripts": {
"build": "nwb build-react-component --title React Form",
"clean": "nwb clean-module && nwb clean-demo",
Expand Down

0 comments on commit 5a56ec6

Please sign in to comment.