Skip to content
Discussion options

You must be logged in to vote

Weird, webpack claims to support their conditional syntax used in the package exports of the lightweight-charts library. I'm a bit confused by this.

Anyhow, I managed to make this work by adjusting the webpack.config.js like this:

const configs = require('./gen-webpack.config.js');
const nodeConfig = require('./gen-webpack.node.config.js');
const path = require('path');

for (const config of configs) {
    config.resolve.alias = {
        // This allows webpack to correctly resolve the package, even though it can't understand the package exports
        'lightweight-charts': path.resolve(__dirname, '../node_modules/lightweight-charts/dist/lightweight-charts.production.mjs'),
    }
}

module.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yoncise
Comment options

@msujew
Comment options

Answer selected by yoncise
@yoncise
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants