elm-native-library/webpack.config.js
2023-01-06 19:21:13 +05:30

23 lines
525 B
JavaScript

const webpack = require("@nativescript/webpack");
const path = require('path');
module.exports = (env) => {
webpack.init(env);
// 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;
};