Created
April 29, 2019 20:16
-
-
Save lacostenycoder/9710abc8cb1b5db5e219af0181e22e41 to your computer and use it in GitHub Desktop.
Fix vue.js no parser error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# goto the root of your application before running this script | |
filename = 'node_modules/vue-loader/lib/template-compiler/index.js' | |
text = File.read(filename) | |
new_code = %q(code = prettier.format(code, { semi: false, parser: 'babel' })) | |
old_code = 'code = prettier.format(code, { semi: false })' | |
replace = text.gsub(old_code, new_code) | |
unless old_code == new_code | |
File.write(filename, replace) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution to webpacker errors when using vue.js in rails based on this answer on stackoverflow