mirror of
https://github.com/zhigang1992/styled-components.git
synced 2026-01-12 22:52:39 +08:00
run benchmarks against local styled-components
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
node_modules
|
||||
benchmarks/**/*.js
|
||||
dist/**/*.js
|
||||
src/decls/**/*.js
|
||||
src/vendor/**/*.js
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
.*/node_modules/metro-bundler/.*
|
||||
.*/node_modules/metro-source-map/.*
|
||||
.*/node_modules/babel-plugin-transform-react-remove-prop-types/.*
|
||||
.*/benchmarks/.*
|
||||
.*/dist/.*
|
||||
.*/lib/.*
|
||||
.*/node_modules/babel-plugin-flow-react-proptypes/src/__test__/.*
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
{
|
||||
"loose": true,
|
||||
"modules": false,
|
||||
"exclude": ["transform-es2015-typeof-symbol"],
|
||||
"exclude": [
|
||||
"transform-es2015-typeof-symbol"
|
||||
],
|
||||
"targets": {
|
||||
"browsers": [
|
||||
"chrome 38",
|
||||
@@ -28,8 +30,20 @@
|
||||
"babel-preset-flow"
|
||||
],
|
||||
"plugins": [
|
||||
["babel-plugin-transform-class-properties", { loose: true }],
|
||||
["babel-plugin-transform-object-rest-spread", { useBuiltIns: true }],
|
||||
["babel-plugin-transform-react-remove-prop-types", { mode: "wrap" }]
|
||||
[
|
||||
"babel-plugin-transform-class-properties",
|
||||
{ loose: true
|
||||
}
|
||||
],
|
||||
[
|
||||
"babel-plugin-transform-object-rest-spread",
|
||||
{ useBuiltIns: true
|
||||
}
|
||||
],
|
||||
[
|
||||
"babel-plugin-transform-react-remove-prop-types",
|
||||
{ mode: "wrap"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const path = require('path');
|
||||
// @flow
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
||||
const path = require('path')
|
||||
|
||||
const appDirectory = path.resolve(__dirname);
|
||||
const appDirectory = path.resolve(__dirname)
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
@@ -9,7 +10,7 @@ module.exports = {
|
||||
entry: './src/index',
|
||||
output: {
|
||||
path: path.resolve(appDirectory, 'dist'),
|
||||
filename: 'bundle.js'
|
||||
filename: 'bundle.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -19,28 +20,29 @@ module.exports = {
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: { module: true, localIdentName: '[hash:base64:8]' }
|
||||
}
|
||||
]
|
||||
options: { module: true, localIdentName: '[hash:base64:8]' },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: [path.resolve(appDirectory, 'src')],
|
||||
include: [path.resolve(appDirectory, 'src'), path.resolve('..', 'src')],
|
||||
use: {
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
}
|
||||
]
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: 'static',
|
||||
openAnalyzer: false
|
||||
})
|
||||
openAnalyzer: false,
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'react-native': 'react-native-web'
|
||||
}
|
||||
}
|
||||
};
|
||||
'react-native': 'react-native-web',
|
||||
'styled-components': path.resolve('../src'),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user