File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # 升级到 3.6
3
+
4
+ ## 规则变更
5
+
6
+ - css import 规则变更,@import '~ foo' 表示 foo 模块,@import 'foo' 表示 foo 文件,[ 详] ( https://github.com/spmjs/spm-sea/issues/2 )
7
+
8
+ 比如:
9
+
10
+ ``` css
11
+ @import ' alice-base' ;
12
+ ```
13
+
14
+ 要改成 :
15
+
16
+ ``` css
17
+ @import ' ~alice-base' ;
18
+ ```
19
+
20
+
21
+ ## 组件开发
22
+
23
+ 主要是 markdown 文件写法变更:
24
+
25
+ - 只能使用 commonjs 写法,不再支持 cmd 的方式
26
+ - 不能 require 相对文件,只能 require 包
27
+
28
+ 比如:
29
+
30
+ ```
31
+ seajs.use('./index', 'jquery', function(Dialog, $) {
32
+ new Dialog($('#el'));
33
+ });
34
+ ```
35
+
36
+ 要修改成:
37
+
38
+ ```
39
+ var Dialog = require('dialog');
40
+ var $ = require('jquery');
41
+
42
+ new Dialog($('#el'));
43
+ ```
44
+
45
+ ## 项目开发
46
+
47
+ 主要是配置项变更:
48
+
49
+ - build 相关的配置项全部移到 build 属性下
50
+ - output 中不支持写 css 文件,需通过 ` extractCSS ` 属性来解决,[ Demo] ( https://github.com/spmjs/examples/tree/spm-webpack/react )
51
+ - 更多详见:[ 配置项] ( ../project/configuration.md )
52
+
53
+ 另外:
54
+
55
+ - 项目调试使用 ` spm server ` 而不是 ` spm-server ` ,详见:[ 调试] ( ../project/debug.md )
56
+
You can’t perform that action at this time.
0 commit comments