Do not treat "yoga-playground" as package #1192

Closed
NickGerleman wants to merge 1 commits from remove-playground into main
4 changed files with 0 additions and 2995 deletions

View File

@@ -1,3 +0,0 @@
src
webpack.config.js
node_modules

View File

@@ -1,19 +0,0 @@
{
"name": "yoga-playground",
"version": "1.0.0",
"main": "dist/index.js",
"author": "Daniel Büchele",
"license": "MIT",
"scripts": {
"build": "webpack && cp ../../../node_modules/antd/dist/antd.min.css dist/antd.min.css"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.6",
"css-loader": "^3.1.0",
"mini-css-extract-plugin": "^0.8.0",
"webpack": "^4.38.0"
}
}

View File

@@ -1,70 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: 'production',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
libraryExport: 'default',
libraryTarget: 'commonjs2'
},
externals: {
// Don't bundle react or react-dom
react: {
commonjs: "react",
commonjs2: "react",
amd: "React",
root: "React"
},
"react-dom": {
commonjs: "react-dom",
commonjs2: "react-dom",
amd: "ReactDOM",
root: "ReactDOM"
}
},
plugins: [
new MiniCssExtractPlugin({
filename: 'index.css',
}),
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
"presets": ["@babel/preset-react"],
"plugins": ["@babel/plugin-transform-flow-strip-types", "@babel/plugin-proposal-class-properties"]
}
}
},
{
test: /\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
// you can specify a publicPath here
// by default it uses publicPath in webpackOptions.output
publicPath: '../',
hmr: process.env.NODE_ENV === 'development',
},
},
'css-loader',
],
}
]
}
};

File diff suppressed because it is too large Load Diff