All Projects → fangkyi03 → spack-new

fangkyi03 / spack-new

Licence: other
毫秒级热更新 毫秒级编译

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to spack-new

simple-todo
A browser extension that replaces the new tab page with a simple todo list
Stars: ✭ 56 (+180%)
Mutual labels:  snowpack
snowpack-rescript-react
A project template to start ReScript React with Snowpack
Stars: ✭ 22 (+10%)
Mutual labels:  snowpack
faven
A web tool to help you generate favicons
Stars: ✭ 126 (+530%)
Mutual labels:  snowpack
app-template-rescript-react
Adding ReScript with rescript-react on top of @snowpack/app-template-react
Stars: ✭ 44 (+120%)
Mutual labels:  snowpack
stimulus-rails-nested-form
A Stimulus controller to create new fields on the fly to populate your Rails relationship.
Stars: ✭ 54 (+170%)
Mutual labels:  snowpack
stimulus-remote-rails
A Stimulus controller to handle Rails UJS events.
Stars: ✭ 18 (-10%)
Mutual labels:  snowpack
svelte-tailwind-snowpack
TailwindCSS with Svelte and Snowpack v3
Stars: ✭ 100 (+400%)
Mutual labels:  snowpack
create-snowpack-app
The all-in-one app template for Snowpack. [moved]
Stars: ✭ 743 (+3615%)
Mutual labels:  snowpack
svelte-typescript-setups
Examples and tests of different bundler setups for Svelte with Typescript and PostCSS (Tailwind)
Stars: ✭ 50 (+150%)
Mutual labels:  snowpack
stimulus-content-loader
A Stimulus controller to asynchronously load HTML from an url.
Stars: ✭ 39 (+95%)
Mutual labels:  snowpack

介绍

只为追求极限的打包性能 毫秒级热更新 毫秒级启动 毫秒级编译是最终目标 不过因为追求极限性能 所以在代码编写过程中 有部分是需要你进行人工规避的

比如

// 这里的moment全部按照你引入的包文件而来 所以你前面写的import moment是没有意义的
// 其实可以简化为 import 'moment' 带来的效果是一样的
import moment from 'moment'
// 另一个地方在于 如果你访问的文件夹是Index那么你的js文件中export default必须跟文件夹同名 大小写要一致
// 否则会找不到文件
export default function Index() {
  return (
    <Input placeholder='测试'></Input>
  )
}

config.js

这个文件类似于webpack的配置文件 里面是这个框架的初始化环境 目前参数不多 后续会添加 其中有一个需要注意的地

  depend:{
    'antd':{
      'js':'https://cdn.bootcdn.net/ajax/libs/antd/4.7.0/antd.min.js',
      'css':'https://cdn.bootcdn.net/ajax/libs/antd/4.7.0/antd.min.css'
    },
    'dayjs':'https://cdn.bootcdn.net/ajax/libs/dayjs/1.4.1/dayjs.min.js',
    'moment':'https://cdn.bootcdn.net/ajax/libs/moment.js/1.0.0/moment.min.js'
  }
  这里有两种不同的写法 直接写字符串的话 默认只能加载js文件 
  如果是又有js又有css的话 请使用上面那种

打包性能

可以执行 npm run test && npm run build 1000个页面 + 1000个组件 优化以后20秒

使用说明

  // 启动
  npm run dev
  // 编译
  npm run build
  // 生成1000个page + 1000个components用来测试打包性能
  npm run test && npm run build

vue介绍

目前vue支持render跟template两种写法 可以看对应的pages目录下的文件

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].