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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not works at development mode #43

Open
jrichardsz opened this issue Sep 21, 2020 · 1 comment
Open

Not works at development mode #43

jrichardsz opened this issue Sep 21, 2020 · 1 comment

Comments

@jrichardsz
Copy link

Following the minimal example:

new MergeIntoSingleFilePlugin({
    files: {
        "vendor.js": [
            'src/assets/vendors/js/vendor.bundle.base.js'
        ]
    }
}),
<script src="./vendor.js"></script> 

I get this error when I execute npm run dev

  Error: Child compilation failed:
  Module not found: Error: Can't resolve './vendor.js' in '/home/jarvis/Incubator/webpack-starter/src':
  Error: Can't resolve './vendor.js' in '/home/jarvis/Incubator/webpack-starter/src'

But if I execute npm run build, I can see a new vendor.js file in dist folder and everything works fine!

What can I do to have the ./vendor.js at development stage?

Thanks

@jrichardsz jrichardsz changed the title Not works at development modeOnly work in build mode Not works at development mode Sep 21, 2020
@markshapiro
Copy link
Owner

@jrichardsz do you by chance call require('./vendor.js') somewhere in our code?
if not then what is your entry in webpack config?

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