Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline script imports are not bundled / copied #1492

Closed
gkjohnson opened this issue Jun 4, 2018 · 1 comment
Closed

Inline script imports are not bundled / copied #1492

gkjohnson opened this issue Jun 4, 2018 · 1 comment

Comments

@gkjohnson
Copy link

馃悰 bug report

Inline script tags are not processed and imported scripts are not bundled or copied to the dist directory

馃 Expected Behavior

Script tag content is bundled the same way that external scripts are bundled and bundled project functions.

馃槸 Current Behavior

importedScript.js

console.log('hello!')

index.html

<html><head>
    <script type="module">
        import './importedScript.js`;

        // prints 'hello' in normal, statically served case
        // 404s when fetching 'importedScript.js' case after being bundled
    </script>
</head></html>

馃拋 Possible Solution

Pull the script tag content out into a separate file and include that or bundle and inline the bundled script in the final target.

馃敠 Context

Bundling a project that used inline scripts to initialize an application

@DeMoorJasper
Copy link
Member

Duplicate of #1456

@DeMoorJasper DeMoorJasper marked this as a duplicate of #1456 Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants