Webpack fails when importing module #18335
-
Bug reportWhat is the current behavior? import dedent from 'https://cdn.jsdelivr.net/npm/dedent@1.5.3/+esm';but webpack fails with webpack.config.js module.export = {
entry: "./foo.js"
}foo.js import dedent from 'https://cdn.jsdelivr.net/npm/dedent@1.5.3/+esm';
dedent`
Foo
Bar
Baz
`;If the current behavior is a bug, please provide the steps to reproduce. What is the expected behavior? Other relevant information: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Beucase by default we don't know your environment (I don't know about |
Beta Was this translation helpful? Give feedback.
So if you need to bundle for browser, you need to set
target: ["web", "es2020"]or you can usebrowserslistand we automatically load it