-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsdx.config.js
40 lines (38 loc) · 1.13 KB
/
tsdx.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const image = require('@rollup/plugin-image')
const css = require('rollup-plugin-import-css')
const copy = require('rollup-plugin-copy-assets')
const scss = require('rollup-plugin-scss')
module.exports = {
rollup(config, options) {
// Babel の設定を修正
config.plugins = config.plugins.map(plugin => {
if (plugin && plugin.name === 'babel') {
return {
...plugin,
options: {
...plugin.options,
babelHelpers: 'runtime' // 'bundled' から 'runtime' に変更
}
};
}
return plugin;
});
// 他のプラグインを追加
config.plugins.unshift(image());
config.plugins.push(css())
config.plugins.push(
copy({
assets: [
"src/assets"
],
})
)
config.plugins.push(
scss({
output: 'dist/css/styles.css',
sass: require('sass')
})
)
return config;
}
}