2023-01-05 10:57:26 +03:00
|
|
|
const webpack = require("@nativescript/webpack");
|
2023-01-06 16:51:13 +03:00
|
|
|
const path = require('path');
|
2023-01-05 10:57:26 +03:00
|
|
|
|
|
|
|
module.exports = (env) => {
|
2023-01-05 11:16:48 +03:00
|
|
|
webpack.init(env);
|
2023-01-05 10:57:26 +03:00
|
|
|
|
2023-01-05 11:16:48 +03:00
|
|
|
// Learn how to customize:
|
|
|
|
// https://docs.nativescript.org/webpack
|
|
|
|
const config = webpack.resolveConfig()
|
|
|
|
config.module.rules.push(
|
|
|
|
{
|
|
|
|
test: /\.elm$/,
|
|
|
|
exclude: [/elm-stuff/, /node_modules/],
|
|
|
|
use: [
|
|
|
|
// warps elm code
|
|
|
|
{ loader: path.resolve('./elm-code-wrap-loader') },
|
|
|
|
{ loader: 'elm-webpack-loader' },
|
|
|
|
]
|
|
|
|
}
|
|
|
|
)
|
|
|
|
return config;
|
2023-01-05 10:57:26 +03:00
|
|
|
};
|