From 4398191f95182e9984d1c44e1b5a03cf1d284bba Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Tue, 8 Sep 2020 14:12:19 +0800 Subject: [PATCH] chore: remove webpack-dev-server --- packages/babel-plugin-jsx/babel.config.js | 1 - packages/babel-plugin-jsx/example/index.js | 30 --------------------- packages/babel-plugin-jsx/package.json | 13 +++------ packages/babel-plugin-jsx/rollup.config.js | 17 ------------ packages/babel-plugin-jsx/webpack.config.js | 26 ------------------ 5 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 packages/babel-plugin-jsx/example/index.js delete mode 100644 packages/babel-plugin-jsx/rollup.config.js delete mode 100644 packages/babel-plugin-jsx/webpack.config.js diff --git a/packages/babel-plugin-jsx/babel.config.js b/packages/babel-plugin-jsx/babel.config.js index aa87b5a..36a9dbe 100644 --- a/packages/babel-plugin-jsx/babel.config.js +++ b/packages/babel-plugin-jsx/babel.config.js @@ -2,7 +2,6 @@ module.exports = { presets: [ '@babel/preset-env', - '@babel/preset-typescript', ], plugins: [ /* eslint-disable-next-line global-require */ diff --git a/packages/babel-plugin-jsx/example/index.js b/packages/babel-plugin-jsx/example/index.js deleted file mode 100644 index d0b0eb8..0000000 --- a/packages/babel-plugin-jsx/example/index.js +++ /dev/null @@ -1,30 +0,0 @@ -import { createApp, defineComponent } from 'vue'; - -const Child = defineComponent({ - props: ['foo'], - setup(props) { - return () =>
{props.foo}
; - }, -}); - -Child.inheritAttrs = false; - -const App = defineComponent({ - data: () => ({ - test: '1', - }), - render() { - return ( - <> - - - - ); - }, -}); - -const app = createApp(App); - -app.mount('#app'); - -console.log(app); diff --git a/packages/babel-plugin-jsx/package.json b/packages/babel-plugin-jsx/package.json index 82ffb99..8a930af 100644 --- a/packages/babel-plugin-jsx/package.json +++ b/packages/babel-plugin-jsx/package.json @@ -14,7 +14,8 @@ "dev": "npm run build && webpack-dev-server", "build": "tsc", "lint": "eslint 'src/*.ts'", - "test": "npm run build && jest --coverage" + "test": "npm run build && jest --coverage", + "prepublish": "npm run build" }, "bugs": { "url": "https://github.com/vuejs/jsx-next/issues" @@ -35,24 +36,16 @@ "devDependencies": { "@babel/core": "^7.0.0", "@babel/preset-env": "^7.0.0", - "@babel/preset-typescript": "^7.10.4", - "@rollup/plugin-babel": "^5.0.3", "@types/jest": "^26.0.7", "@types/svg-tags": "^1.0.0", "@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/parser": "^4.0.1", "@vue/compiler-dom": "3.0.0-rc.10", "@vue/test-utils": "2.0.0-beta.2", - "babel-jest": "^26.0.1", - "babel-loader": "^8.1.0", "jest": "^26.0.1", "regenerator-runtime": "^0.13.5", - "rollup": "^2.13.1", "ts-jest": "^26.1.3", "typescript": "^4.0.2", - "vue": "3.0.0-rc.10", - "webpack": "^4.43.0", - "webpack-cli": "^3.3.11", - "webpack-dev-server": "^3.10.3" + "vue": "3.0.0-rc.10" } } diff --git a/packages/babel-plugin-jsx/rollup.config.js b/packages/babel-plugin-jsx/rollup.config.js deleted file mode 100644 index 0f35b68..0000000 --- a/packages/babel-plugin-jsx/rollup.config.js +++ /dev/null @@ -1,17 +0,0 @@ -// import babel from '@rollup/plugin-babel'; -import commonjs from '@rollup/plugin-commonjs'; -import typescript from '@rollup/plugin-typescript'; - -export default { - input: 'src/index.ts', - plugins: [ - commonjs(), - typescript(), - ], - output: [ - { - file: 'dist/index.js', - format: 'cjs', - }, - ], -}; diff --git a/packages/babel-plugin-jsx/webpack.config.js b/packages/babel-plugin-jsx/webpack.config.js deleted file mode 100644 index 0a2129b..0000000 --- a/packages/babel-plugin-jsx/webpack.config.js +++ /dev/null @@ -1,26 +0,0 @@ -const path = require('path'); - -module.exports = { - mode: 'development', - devtool: 'cheap-module-eval-source-map', - entry: './example/index.js', - output: { - path: path.resolve(__dirname, './dist'), - publicPath: '/dist/', - }, - module: { - rules: [ - { - test: /\.jsx?$/, - loader: 'babel-loader', - exclude: /node_modules/, - }, - ], - }, - devServer: { - inline: true, - open: true, - hot: true, - overlay: true, - }, -};