Skip to content

Commit 1f662d3

Browse files
committed
chore(examples): Update Babel and Webpack configurations
1 parent d400ae3 commit 1f662d3

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

examples/lazy-load-component/babel.config.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ module.exports = {
1010
},
1111
],
1212
],
13-
// plugins: [
14-
// [
15-
// "import",
16-
// {
17-
// libraryName: "taro-ui",
18-
// customName: (name) => `taro-ui/lib/components/${name.slice(3)}`,
19-
// customStyleName: (name) =>
20-
// `taro-ui/dist/style/components/${name.slice(3)}.scss`,
21-
// },
22-
// "taro-ui",
23-
// ],
24-
// ],
13+
plugins: [
14+
[
15+
"import",
16+
{
17+
libraryName: "taro-ui",
18+
customName: (name) => `taro-ui/lib/components/${name.slice(3)}`,
19+
customStyleName: (name) =>
20+
`taro-ui/dist/style/components/${name.slice(3)}.scss`,
21+
},
22+
"taro-ui",
23+
],
24+
],
2525
};

examples/lazy-load-component/config/index.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ const config = {
1919
}
2020
},
2121
framework: 'react',
22-
compiler: {
23-
type: 'webpack5',
24-
prebundle: {
25-
enable: false,
26-
}
27-
},
22+
compiler: 'webpack5',
2823
cache: {
2924
enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
3025
},

0 commit comments

Comments
 (0)