Comments (3)
没有要求,可以试下这样配,然后在 index.js 里 require 对应的 css 文件。
"spm": {
"output": [
"static/page1/index.js",
"static/page2/index.js"
],
"build": {
"extractCSS": true
}
}
如果要同时输出 html,可以把 html 文件也添加到 output 里。
from docs.
好像有点麻烦,一般项目文件肯定很多吧,支持正则或目录的写法吗
from docs.
我记得这里的 output 应该是 glob 语法,你试试
"output": [
"**/*.js"
]
https://github.com/isaacs/node-glob
from docs.
Related Issues (19)
- touch index.html index.js HOT 3
- get started
- spm doc Module not found, http://127.0.0.1:8000/examples 页面报 require('../index.js') 错误 HOT 1
- require用绝对路径怎么办 HOT 4
- ReferenceError: Promise is not defined HOT 3
- server启动后html一改动就异常 HOT 1
- 运行 spm test 报错
- is spm support proxy to install package?
- spm 反向代理如何配置
- spm v3.6.0 unknown option `--with-deps' HOT 1
- less文件 sourcemap无法追踪
- require 未定义
- spm无法安装
- Commands HOT 1
- 为什么要关闭spmjs.io呢? HOT 1
- 请求更新文档 HOT 4
- spm build --watch 速度疑问 HOT 5
- 关于 hash HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.