2020-04-29 12:03:06 +08:00
|
|
|
const path = require("path");
|
2019-10-08 19:20:12 +08:00
|
|
|
module.exports = ({ config }) => {
|
|
|
|
|
2019-12-07 01:43:18 +08:00
|
|
|
// config.module.rules.push({
|
|
|
|
// test: /\.glsl$/,
|
|
|
|
// loader: 'raw-loader'
|
|
|
|
// });
|
2019-10-08 19:20:12 +08:00
|
|
|
|
|
|
|
// config.module.rules.push({
|
|
|
|
// test: /\.worker\.(js|ts)$/,
|
|
|
|
// use: {
|
|
|
|
// loader: 'worker-loader',
|
|
|
|
// options: { inline: true, fallback: false }
|
|
|
|
// }
|
|
|
|
// });
|
2020-05-03 19:58:17 +08:00
|
|
|
config.module.rules =[];
|
|
|
|
|
|
|
|
config.module.rules.push(
|
|
|
|
|
|
|
|
{
|
2019-10-08 19:20:12 +08:00
|
|
|
|
|
|
|
test: /\.(ts|tsx)$/,
|
|
|
|
loader: require.resolve('awesome-typescript-loader'),
|
2020-05-03 19:58:17 +08:00
|
|
|
|
2019-10-08 19:20:12 +08:00
|
|
|
});
|
|
|
|
|
2020-05-03 19:58:17 +08:00
|
|
|
config.module.rules.push(
|
|
|
|
{
|
|
|
|
test: /.css$/,
|
|
|
|
use: ["style-loader", "css-loader", 'sass-loader'],
|
|
|
|
|
2019-10-08 19:20:12 +08:00
|
|
|
enforce: 'pre',
|
2019-10-24 21:23:15 +08:00
|
|
|
},
|
2020-01-20 12:14:49 +08:00
|
|
|
{
|
|
|
|
test: /\.stories\.svg$/,
|
|
|
|
loader: 'svg-inline-loader'
|
|
|
|
}
|
2019-10-24 21:23:15 +08:00
|
|
|
);
|
2020-10-08 23:24:08 +08:00
|
|
|
// config.resolve.alias = {
|
|
|
|
// '@antv/l7-district': path.resolve(__dirname, '../packages/boundary/src'),
|
|
|
|
// }
|
2019-10-08 19:20:12 +08:00
|
|
|
|
2020-05-03 19:58:17 +08:00
|
|
|
config.resolve.extensions.push('.ts', '.tsx', 'css', '.js', '.glsl');
|
2019-10-08 19:20:12 +08:00
|
|
|
|
|
|
|
return config;
|
2019-10-24 21:23:15 +08:00
|
|
|
};
|