Skip to content

Commit

Permalink
feat: add vue-cli in playground
Browse files Browse the repository at this point in the history
  • Loading branch information
RuSenLi committed May 14, 2024
1 parent cf7e818 commit 4182510
Show file tree
Hide file tree
Showing 15 changed files with 15,323 additions and 1,210 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"dev": "tsup --watch src",
"build:fix": "esno scripts/postbuild.ts",
"lint": "eslint .",
"play": "npm -C playground run dev",
"play": "npm -C playground/vite run dev",
"prepublishOnly": "npm run build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'vite'
import Inspect from 'vite-plugin-inspect'
import Unplugin from '../src/vite'
import Unplugin from '../../src/vite'

export default defineConfig({
plugins: [
Expand Down
5 changes: 5 additions & 0 deletions playground/vue-cli/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
19 changes: 19 additions & 0 deletions playground/vue-cli/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
8,574 changes: 8,574 additions & 0 deletions playground/vue-cli/package-lock.json

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions playground/vue-cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "vue-cli",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.8.3",
"vue": "^2.6.14"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"vue-template-compiler": "^2.6.14"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
17 changes: 17 additions & 0 deletions playground/vue-cli/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
1 change: 1 addition & 0 deletions playground/vue-cli/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.getElementById('app').innerHTML = '__UNPLUGIN__'
11 changes: 11 additions & 0 deletions playground/vue-cli/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { defineConfig } = require('@vue/cli-service')
const Unplugin = require('../../dist/webpack.cjs')

module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
plugins: [
Unplugin(),
],
},
})
Loading

0 comments on commit 4182510

Please sign in to comment.